Improve tests for Node and Port DB objects.

- Prevented overlaping asserts by separating sequencial
  tests to several small ones.
- Added tests for updating and destroying a port.
- Added more assertions to node reservation tests.

Change-Id: I1f67d24ae1938546c3b6e93caf89013d18b090f3
This commit is contained in:
Roman Prykhodchenko
2013-06-14 13:43:08 +03:00
parent f8a46fea42
commit ddee66b614
3 changed files with 123 additions and 51 deletions

View File

@@ -202,8 +202,7 @@ class Connection(api.Connection):
query = add_uuid_filter(query, node)
print "Updating with %s." % values
count = query.update(values,
synchronize_session='fetch')
count = query.update(values, synchronize_session='fetch')
if count != 1:
raise exception.NodeNotFound(node=node)
ref = query.one()