def test_aggregate_post_with_empty_affinity_zone(self):
body = {"name": "test_empty",
"metadata": {"affinity_zone": ""}}
response = self.post_json(
'/aggregates', body, headers=self.headers, expect_errors=True)
self.assertEqual(http_client.BAD_REQUEST, response.status_code)
self.assertEqual('application/json', response.content_type)
self.assertTrue(response.json['error_message'])
评论列表
文章目录