Add existing bigfiles to piecefield if they were downloaded outside of ZeroNet
This commit is contained in:
parent
fbc10b8e32
commit
1189c76691
2 changed files with 22 additions and 6 deletions
|
@ -2,9 +2,11 @@ import time
|
|||
import gevent
|
||||
|
||||
import pytest
|
||||
import mock
|
||||
|
||||
from Crypt import CryptConnection
|
||||
from Connection import ConnectionServer
|
||||
from Config import config
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("resetSettings")
|
||||
|
@ -15,7 +17,9 @@ class TestConnection:
|
|||
assert file_server != client
|
||||
|
||||
# Connect to myself
|
||||
connection = client.getConnection("127.0.0.1", 1544)
|
||||
with mock.patch('Config.config.ip_local', return_value=[]): # SSL not used for local ips
|
||||
connection = client.getConnection("127.0.0.1", 1544)
|
||||
|
||||
assert len(file_server.connections) == 1
|
||||
assert connection.handshake
|
||||
assert connection.crypt
|
||||
|
@ -35,7 +39,9 @@ class TestConnection:
|
|||
crypt_supported_bk = CryptConnection.manager.crypt_supported
|
||||
CryptConnection.manager.crypt_supported = []
|
||||
|
||||
connection = client.getConnection("127.0.0.1", 1544)
|
||||
print "---"
|
||||
with mock.patch('Config.config.ip_local', return_value=[]): # SSL not used for local ips
|
||||
connection = client.getConnection("127.0.0.1", 1544)
|
||||
assert len(file_server.connections) == 1
|
||||
assert not connection.crypt
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue