Remove 'date' from Object resource

While creating the various type formatters for properties, I created one
for the timestamp format used on the Date prop that is included in the
headers of account, container, and object resources. However, that
property just duplicates that of the X-Timestamp prop. Since the format
of X-Timestamp is also used elsewhere, it doesn't make much sense to
both include the duplicated info in Date along with having a custom
formatter for it. This change removes Date entirely (it never existed on
account or container, but was about to be added in another change which
spurred its removal here).

Change-Id: Ia458f0d6cb4ba4f4500df97cd58c62afd6d5b05f
This commit is contained in:
Brian Curtin
2016-02-02 12:30:32 -05:00
parent 2221c3831d
commit dbb9e9d882
2 changed files with 0 additions and 3 deletions

View File

@@ -104,8 +104,6 @@ class Object(resource.Resource):
etag = resource.header("etag")
#: Set to True if this object is a static large object manifest object.
is_static_large_object = resource.header("x-static-large-object")
#: The transaction date and time.
date = resource.header("date")
#: If set, the value of the Content-Encoding metadata.
#: If not set, this header is not returned by this operation.
content_encoding = resource.header("content-encoding")

View File

@@ -101,7 +101,6 @@ class TestObject(testtools.TestCase):
self.assertEqual(datetime(2016, 1, 21, 22, 10, 56, 281120,
tzinfo=iso8601.UTC),
sot.timestamp)
self.assertEqual(headers['date'], sot.date)
self.assertEqual(headers['content-type'], sot.content_type)
self.assertEqual(datetime(2016, 1, 21, 22, 43, 46, 167440,
tzinfo=iso8601.UTC),