Port test_quotas to Python 3

* test_quotas.py replace "params = {'bad data'}" (set) with "params =
  {'bad' :'data'}" (dict). On Python 2, webtest uses
  StringIO.StringIO() which accepts sets. On Python 3, webtest uses
  io.BytesIO() which doesn't accept sets.
* Remove following barbican.tests.api.controllers unit tests from
  tests-py3-blacklist.txt:

  - test_orders
  - test_quotas

Partially implements: blueprint barbican-py3
Change-Id: I58fc4e4274902a1196e466c00399fa2e8c4621ac
This commit is contained in:
Victor Stinner 2016-06-14 12:13:06 +02:00
parent 7a9c13f2e8
commit b113f6364f
2 changed files with 1 additions and 3 deletions

View File

@ -99,7 +99,7 @@ class WhenTestingQuotas(utils.BarbicanAPIBaseTestCase):
def test_should_return_bad_data_put_project_quotas(self):
"""PUT not allowed operation for /project-quotas/{project-id}"""
params = {'bad data'}
params = {'bad': 'value'}
resp = self.app.put(
'/project-quotas/{0}'.format(self.project_id),
params, expect_errors=True)

View File

@ -1,5 +1,3 @@
barbican.tests.api.controllers.test_containers
barbican.tests.api.controllers.test_orders
barbican.tests.api.controllers.test_quotas
barbican.tests.api.controllers.test_secrets
barbican.tests.cmd.test_db_cleanup