@@ -46,10 +46,17 @@ def test_capture(self) -> None:
46
46
uuid = self .github_instance .submit (url = 'https://rafiot.eu.pythonanywhere.com/redirect_http' , quiet = True )
47
47
self ._wait_capture_done (uuid )
48
48
response = self .github_instance .get_redirects (uuid )
49
- print (response )
50
49
self .assertEqual ('https://rafiot.eu.pythonanywhere.com/redirect_http' , response ['response' ]['url' ])
51
50
self .assertEqual ('https://www.youtube.com/watch?v=iwGFalTRHDA' , response ['response' ]['redirects' ][1 ])
52
51
52
+ # test export - import
53
+ capture_export = self .github_instance .get_complete_capture (uuid )
54
+ new_uuid , messages = self .github_instance .upload_capture (full_capture = capture_export , quiet = False )
55
+ self .assertNotEqual (uuid , new_uuid )
56
+ self .assertFalse (messages ['errors' ])
57
+ self .assertEqual (len (messages ['warnings' ]), 1 )
58
+ self .assertEqual (messages ['warnings' ][0 ], f'UUID { uuid } already exists, set a new one.' )
59
+
53
60
def test_referer (self ) -> None :
54
61
uuid = self .github_instance .submit (url = 'https://rafiot.eu.pythonanywhere.com/referer' , quiet = True )
55
62
self ._wait_capture_done (uuid )
@@ -123,10 +130,10 @@ def test_takedown_information(self) -> None:
123
130
124
131
uuid = self .github_instance .submit (url = "https://www.circl.lu/" , quiet = True )
125
132
self ._wait_capture_done (uuid )
126
- #get all takedown information
133
+ # get all takedown information
127
134
takedown_info = self .github_instance .get_takedown_information (capture_uuid = uuid )
128
135
self .assertEqual (set (expected_takedown_info [0 ]), set (takedown_info [0 ]))
129
- #get only the filtered emails
136
+ # get only the filtered emails
130
137
filtered_mails = self .github_instance .get_takedown_information (capture_uuid = uuid , filter_contacts = True )
131
138
self .assertEqual (set (expected_mails ), set (filtered_mails ))
132
139
0 commit comments