Make sure the test went without unnecessary reconnects
This commit is contained in:
parent
9b36c55422
commit
a3f957427f
2 changed files with 5 additions and 1 deletions
|
@ -45,10 +45,11 @@ class TestConnection:
|
|||
|
||||
|
||||
# Close connection
|
||||
connection.close()
|
||||
connection.close("Test ended")
|
||||
client.stop()
|
||||
time.sleep(0.01)
|
||||
assert len(file_server.connections) == 0
|
||||
assert file_server.num_incoming == 2 # One for file_server fixture, one for the test
|
||||
|
||||
def testRawConnection(self, file_server):
|
||||
client = ConnectionServer(file_server.ip, 1545)
|
||||
|
|
|
@ -52,9 +52,12 @@ class TestSiteDownload:
|
|||
assert len(site_temp.content_manager.contents) == len(site.content_manager.contents) - 1
|
||||
assert not bad_files
|
||||
|
||||
assert file_server.num_incoming == 2 # One for file_server fixture, one for the test
|
||||
|
||||
assert site_temp.storage.deleteFiles()
|
||||
[connection.close() for connection in file_server.connections]
|
||||
|
||||
|
||||
def testArchivedDownload(self, file_server, site, site_temp):
|
||||
# Init source server
|
||||
site.connection_server = file_server
|
||||
|
|
Loading…
Reference in a new issue