Commit 6460f2eb authored by Christos Stavrakakis's avatar Christos Stavrakakis

Fix current db, logic and api tests

parent e90354cf
This diff is collapsed.
[
{
"model": "db.Backend",
"pk": 30000,
"fields": {
"clustername": "test",
"port": 5080,
"drained": false,
"index": 3
}
},
{
"model": "db.Flavor",
"pk": 30000,
......@@ -17,6 +27,17 @@
"disk": 20
}
},
{
"model": "db.Network",
"pk": 30000,
"fields": {
"subnet": "10.0.0.0/24",
"gateway": "10.0.0.1",
"flavor": "IP_LESS_ROUTED",
"public": true,
"mac_prefix": "aa:00:0"
}
},
{
"model": "db.VirtualMachine",
"pk": 30000,
......@@ -27,7 +48,8 @@
"imageid": "30000",
"hostid": "HAL-9000",
"flavor": 30000,
"operstate": "STARTED"
"operstate": "STARTED",
"backend": 30000
}
},
{
......@@ -40,7 +62,8 @@
"imageid": "30000",
"hostid": "HAL-9000",
"flavor": 30000,
"operstate": "STOPPED"
"operstate": "STOPPED",
"backend": 30000
}
},
{
......@@ -53,7 +76,8 @@
"imageid": "30000",
"hostid": "HAL-9000",
"flavor": 30000,
"operstate": "BUILD"
"operstate": "BUILD",
"backend": 30000
}
}
]
......@@ -45,13 +45,6 @@ class FlavorTestCase(TestCase):
"""Test a flavor object, its internal cost calculation and naming methods"""
flavor = Flavor.objects.get(pk=30000)
# test current active/inactive costs
c_active = flavor.current_cost_active
c_inactive = flavor.current_cost_inactive
self.assertEqual(c_active, 10, 'flavor.cost_active should be 10! (%d)' % (c_active,))
self.assertEqual(c_inactive, 5, 'flavor.cost_inactive should be 5! (%d)' % (c_inactive,))
# test name property, should be C1R1024D10
f_name = flavor.name
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment