Fix the python 3.11 unit test job
added debian platform in bindep.txt and dummy object in dump_as_bytes() function in test_controller.py Change-Id: I0802eed1dd33edfcb4e3403b4f8abea3a8abcac8
This commit is contained in:
parent
4d70e17409
commit
630d8125d9
@ -3,10 +3,10 @@
|
||||
|
||||
gettext [test]
|
||||
|
||||
mysql-client [platform:dpkg]
|
||||
mysql-server [platform:dpkg]
|
||||
mysql-client [platform:dpkg !platform:debian]
|
||||
mysql-server [platform:dpkg !platform:debian]
|
||||
postgresql
|
||||
postgresql-client [platform:dpkg]
|
||||
postgresql-server [platform:rpm]
|
||||
mariadb [platform:rpm]
|
||||
mariadb-server [platform:rpm]
|
||||
mariadb-server [platform:rpm platform:debian]
|
||||
|
@ -728,7 +728,7 @@ class TestController(base.TestCase):
|
||||
% constants.UUID)
|
||||
req.headers['Content-Type'] = 'application/zip'
|
||||
req.method = 'PUT'
|
||||
req.body = jsonutils.dump_as_bytes(mock.mock_open())
|
||||
req.body = jsonutils.dump_as_bytes({'dummy': {'val': 'foo'}})
|
||||
resp = req.get_response(self.app)
|
||||
mock_glance_store.assert_called()
|
||||
self.assertEqual(http_client.ACCEPTED, resp.status_code)
|
||||
@ -739,7 +739,7 @@ class TestController(base.TestCase):
|
||||
% constants.INVALID_UUID)
|
||||
req.headers['Content-Type'] = 'application/zip'
|
||||
req.method = 'PUT'
|
||||
req.body = jsonutils.dump_as_bytes(mock.mock_open())
|
||||
req.body = jsonutils.dump_as_bytes({'dummy': {'val': 'foo'}})
|
||||
|
||||
msg = _("Can not find requested vnf package: %s") \
|
||||
% constants.INVALID_UUID
|
||||
@ -757,7 +757,7 @@ class TestController(base.TestCase):
|
||||
'/vnf_packages/%s/package_content' % constants.UUID)
|
||||
req.headers['Content-Type'] = 'application/zip'
|
||||
req.method = 'PUT'
|
||||
req.body = jsonutils.dump_as_bytes(mock.mock_open())
|
||||
req.body = jsonutils.dump_as_bytes({'dummy': {'val': 'foo'}})
|
||||
|
||||
msg = _("Can not find requested vnf package: %s") % constants.UUID
|
||||
res = self._make_problem_detail('Not Found', msg, 404)
|
||||
@ -774,7 +774,7 @@ class TestController(base.TestCase):
|
||||
'/vnf_packages/%s/package_content' % constants.UUID)
|
||||
req.headers['Content-Type'] = 'application/zip'
|
||||
req.method = 'PUT'
|
||||
req.body = jsonutils.dump_as_bytes(mock.mock_open())
|
||||
req.body = jsonutils.dump_as_bytes({'dummy': {'val': 'foo'}})
|
||||
|
||||
msg = _("VNF Package %s onboarding state is not CREATED") \
|
||||
% constants.UUID
|
||||
@ -1415,7 +1415,7 @@ class TestControllerEnhancedPolicy(TestController):
|
||||
% constants.UUID)
|
||||
req.headers['Content-Type'] = 'application/zip'
|
||||
req.method = 'PUT'
|
||||
req.body = jsonutils.dump_as_bytes(mock.mock_open())
|
||||
req.body = jsonutils.dump_as_bytes({'dummy': {'val': 'foo'}})
|
||||
resp = req.get_response(self.app)
|
||||
mock_glance_store.assert_called()
|
||||
self.assertEqual(http_client.ACCEPTED, resp.status_code)
|
||||
@ -1459,7 +1459,7 @@ class TestControllerEnhancedPolicy(TestController):
|
||||
% constants.UUID)
|
||||
req.headers['Content-Type'] = 'application/zip'
|
||||
req.method = 'PUT'
|
||||
req.body = jsonutils.dump_as_bytes(mock.mock_open())
|
||||
req.body = jsonutils.dump_as_bytes({'dummy': {'val': 'foo'}})
|
||||
resp = req.get_response(fakes.wsgi_app_v1(fake_auth_context=ctx))
|
||||
mock_glance_store.assert_called()
|
||||
self.assertEqual(expected_status_code, resp.status_code)
|
||||
|
Loading…
Reference in New Issue
Block a user