def test_store_in_two_steps_crosswalks(node1, node2, store_path): crosswalks = [node1, node2] store(crosswalks) store(crosswalks) with open(store_path, 'r') as f: data = json.load(f) assert len(data['nodes']) == 4
def test_store_in_two_steps_crosswalks(node1, node2): crosswalks = [node1, node2] store(crosswalks) store(crosswalks) with open(PATH_TO_CROSSWALKS, 'r') as f: data = json.load(f) assert len(data['crosswalks']) == 4
def test_store_zero_crosswalks(store_path): store([]) with open(store_path, 'r') as f: data = json.load(f) assert len(data['nodes']) == 0
def test_store_zero_crosswalks(): store([]) with open(PATH_TO_CROSSWALKS, 'r') as f: data = json.load(f) assert len(data['crosswalks']) == 0