summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vio/vio/tests/test_fake_neutron_view.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_neutron_view.py b/vio/vio/tests/test_fake_neutron_view.py
index 9e670d7..4a9c061 100644
--- a/vio/vio/tests/test_fake_neutron_view.py
+++ b/vio/vio/tests/test_fake_neutron_view.py
@@ -38,3 +38,21 @@ class TestakeNeutron(unittest.TestCase):
}
resp = self.view.get(req)
self.assertEqual(200, resp.status_code)
+
+
+class TesFakeNeutronNetwork(unittest.TestCase):
+
+ def setUp(self):
+ self.view = views.FakeNeutronNetwork()
+
+ @mock.patch.object(fakeResponse, "network_list")
+ def test_get_neutron_network(self, mock_network_list):
+ req = mock.Mock()
+ req.META = {
+ "HTTP_X_AUTH_TOKEN": Token
+ }
+ mock_network_list.return_value = {
+ "network": "net1"
+ }
+ resp = self.view.get(req)
+ self.assertEqual(200, resp.status_code)