summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorAlex Meade <alex.meade@rackspace.com>2011-07-26 16:42:16 -0400
committerAlex Meade <alex.meade@rackspace.com>2011-07-26 16:42:16 -0400
commit2e652f4cc72976ecc471a6c6f3b48afb3eb5a420 (patch)
treeff8ffbab3218777325e9c7f6a66bb997180c3a0e /nova/tests
parentb45fa225f9477f4bae11cd379288db459d4b3c02 (diff)
Updated test stubs to contain the correct data
Updated created and updated in responses to use correct time format
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/test_servers.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/nova/tests/api/openstack/test_servers.py b/nova/tests/api/openstack/test_servers.py
index 4ca79434f..e154fb4fa 100644
--- a/nova/tests/api/openstack/test_servers.py
+++ b/nova/tests/api/openstack/test_servers.py
@@ -16,6 +16,7 @@
# under the License.
import base64
+import datetime
import json
import unittest
from xml.dom import minidom
@@ -172,8 +173,10 @@ def stub_instance(id, user_id=1, private_address=None, public_addresses=None,
instance = {
"id": int(id),
- "created_at": "2010-10-10T12:00:00Z",
- "updated_at": "2010-11-11T11:00:00Z",
+ "created_at": datetime.datetime.strptime("2010-10-10 12:00:00",
+ "%Y-%m-%d %H:%M:%S"),
+ "updated_at": datetime.datetime.strptime("2010-11-11 11:00:00",
+ "%Y-%m-%d %H:%M:%S"),
"admin_pass": "",
"user_id": user_id,
"project_id": "",
@@ -1048,8 +1051,10 @@ class ServersTest(test.TestCase):
'uuid': FAKE_UUID,
'instance_type': dict(inst_type),
'image_ref': image_ref,
- 'created_at': '2010-10-10T12:00:00Z',
- 'updated_at': '2010-11-11T11:00:00Z',
+ "created_at": datetime.datetime.strptime("2010-10-10 12:00:00",
+ "%Y-%m-%d %H:%M:%S"),
+ "updated_at": datetime.datetime.strptime("2010-11-11 11:00:00",
+ "%Y-%m-%d %H:%M:%S"),
}
def server_update(context, id, params):
@@ -2901,8 +2906,10 @@ class ServersViewBuilderV11Test(test.TestCase):
def _get_instance(self):
instance = {
"id": 1,
- "created_at": "2010-10-10T12:00:00Z",
- "updated_at": "2010-11-11T11:00:00Z",
+ "created_at": datetime.datetime.strptime("2010-10-10 12:00:00",
+ "%Y-%m-%d %H:%M:%S"),
+ "updated_at": datetime.datetime.strptime("2010-11-11 11:00:00",
+ "%Y-%m-%d %H:%M:%S"),
"admin_pass": "",
"user_id": "",
"project_id": "",