Skip to content
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.

Commit

Permalink
More test improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoWheelDev committed Nov 3, 2014
1 parent 9dfbbe2 commit 094217a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,35 @@ def test_nodes(self):

def test_links(self):
self.assertListEqual(self.app.links, [])
self.app.links = [{'id': 1}]
self.assertListEqual(self.app.links, [{'id': 1}])

def test_notes(self):
self.assertListEqual(self.app.notes, [])
self.app.notes = [{'id': 1}]
self.assertListEqual(self.app.notes, [{'id': 1}])

def test_shapes(self):
self.assertDictEqual(self.app.shapes,
{'ellipse': None, 'rectangle': None})
self.app.shapes = {'ellipse': {'id': 1},
'rectangle': {'id': 2}}
self.assertDictEqual(self.app.shapes, {'ellipse': {'id': 1},
'rectangle': {'id': 2}})

def test_images(self):
self.assertListEqual(self.app.images, [])
self.app.images = [{'id': 1}]
self.assertListEqual(self.app.images, [{'id': 1}])

def test_servers(self):
exp_res = [{'host': '127.0.0.1', 'id': 1, 'local': True, 'port': 8000}]
self.assertListEqual(self.app.servers, exp_res)
self.app.servers = [{'host': '127.0.0.1', 'id': 2, 'local': True,
'port': 8001}]
exp_res = [{'host': '127.0.0.1', 'id': 2, 'local': True,
'port': 8001}]
self.assertListEqual(self.app.servers, exp_res)

def test_name(self):
self.assertIsNone(self.app.name)
Expand Down

0 comments on commit 094217a

Please sign in to comment.