big work #2
@ -9,7 +9,7 @@ import requests
|
|||||||
import requests.exceptions
|
import requests.exceptions
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import app
|
||||||
|
|
||||||
REDIS_URL = "redis://localhost/0"
|
REDIS_URL = "redis://localhost/0"
|
||||||
REDIS_TIMEOUT = 2
|
REDIS_TIMEOUT = 2
|
||||||
@ -20,7 +20,7 @@ CURRENT_IPADDR = "192.168.1.50"
|
|||||||
LOCAL_UUID = "testuuid1"
|
LOCAL_UUID = "testuuid1"
|
||||||
os.environ["LOCAL_UUID"] = LOCAL_UUID
|
os.environ["LOCAL_UUID"] = LOCAL_UUID
|
||||||
|
|
||||||
|
os.environ["INITIAL_SERVERS"] = "127.0.0.1,192.168.0.1,172.20.0.2"
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def redis_super_storage_instance(mocker):
|
def redis_super_storage_instance(mocker):
|
||||||
@ -443,3 +443,13 @@ def test_cc_sync_all_error_logged(mocker, requests_mock, consumer_communicator_i
|
|||||||
|
|
||||||
logging.error.assert_called_once()
|
logging.error.assert_called_once()
|
||||||
|
|
||||||
|
|
||||||
|
# ========================================
|
||||||
|
# App
|
||||||
|
# ========================================
|
||||||
|
|
||||||
|
|
||||||
|
def test_app_get_initial_ip_list():
|
||||||
|
lst = app.get_initial_ip_list()
|
||||||
|
|
||||||
|
assert lst == ["127.0.0.1", "192.168.0.1", "172.20.0.2"]
|
||||||
|
Reference in New Issue
Block a user