~ubuntu-branches/ubuntu/vivid/swift/vivid-updates

« back to all changes in this revision

Viewing changes to test/unit/common/test_direct_client.py

  • Committer: Package Import Robot
  • Author(s): James Page, Chuck Short, James Page
  • Date: 2014-10-06 10:06:11 UTC
  • mfrom: (1.2.31)
  • Revision ID: package-import@ubuntu.com-20141006100611-wdzkkuoru7ubtlml
Tags: 2.1.0-0ubuntu1
[ Chuck Short ]
* debian/patches/fix-doc-no-network.patch: Refreshed.
* debian/control: Add python-oslosphinx as a build dependency.

[ James Page ]
* New upstream release for OpenStack Juno.
* d/copyright: Add linebreaks to fixup file-without-copyright-
  information warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from swift.common.exceptions import ClientException
28
28
from swift.common.utils import json, Timestamp
29
29
from swift.common.swob import HeaderKeyDict, RESPONSE_REASONS
30
 
from swift.common.storage_policy import POLICY_INDEX, POLICIES
 
30
from swift.common.storage_policy import POLICIES
31
31
 
32
32
from test.unit import patch_policies
33
33
 
134
134
            for add_ts in (True, False):
135
135
                now = time.time()
136
136
                headers = direct_client.gen_headers(
137
 
                    {POLICY_INDEX: policy.idx}, add_ts=add_ts)
 
137
                    {'X-Backend-Storage-Policy-Index': policy.idx},
 
138
                    add_ts=add_ts)
138
139
                self.assertEqual(headers['user-agent'], stub_user_agent)
139
 
                self.assertEqual(headers[POLICY_INDEX], str(policy.idx))
 
140
                self.assertEqual(headers['X-Backend-Storage-Policy-Index'],
 
141
                                 str(policy.idx))
140
142
                expected_header_count = 2
141
143
                if add_ts:
142
144
                    expected_header_count += 1