Skip to content

Commit

Permalink
update confest
Browse files Browse the repository at this point in the history
  • Loading branch information
student committed Aug 21, 2024
1 parent 1cd06c5 commit 6909d1e
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions topology-conversion/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def ampath_topology():
json_file.close()
return data


@pytest.fixture
def oxp_topology():
"""Build oxp topology json_data"""
Expand Down Expand Up @@ -59,7 +58,6 @@ def mock_requests_get(mocker):
"""Fixture to mock requests.get."""
return mocker.patch('requests.get')


@pytest.fixture
def mock_json_reader(mocker):
"""Fixture to mock json_reader function"""
Expand All @@ -70,21 +68,6 @@ def mock_json_reader(mocker):
"vlans": {"vlan1": {"name": "vlan1"}}
})

'''
def mock_get(url, timeout=10):
response = Response()
response.status_code = 200
content = ""
if url == "http://mock.url/topology":
content = {"topology": {"switches": {}, "links": {}}}
if url == "http://mock.url/topology/switches":
content = {"switches": {}}
if url == "http://mock.url/connection/evc":
content = {"result": "success"}
response._content = json.dumps(content).encode('utf-8')
return response'''

@pytest.fixture
def mock_requests(mocker):
"""Fixture to mock requests.get and requests.post"""
Expand Down Expand Up @@ -119,4 +102,3 @@ def mock_post(url, json=None, timeout=10):

mocker.patch('requests.get', side_effect=mock_get)
mocker.patch('requests.post', side_effect=mock_post)

0 comments on commit 6909d1e

Please sign in to comment.