Improve delete tags test

Change-Id: If22bdcd7d66bae5b08f949f21fc81fc292c21a7b
This commit is contained in:
Feodor Tersin 2015-01-21 20:20:54 +04:00
parent 71c831fb78
commit 2f1c125e81
2 changed files with 9 additions and 1 deletions

View File

@ -81,7 +81,7 @@ def create_tags(context, resource_id, tag):
return True
def delete_tags(context, resource_id, tag):
def delete_tags(context, resource_id, tag=None):
db_api.delete_tags(context, resource_id, tag)
return True

View File

@ -153,6 +153,14 @@ class TagTestCase(base.ApiTestCase):
{'key': 'key3',
'value': 'value3'}])
resp = self.execute('DeleteTags',
{'ResourceId.1': fakes.ID_EC2_VPC_1})
self.assertEqual({'http_status_code': 200,
'return': True},
resp)
self.db_api.delete_tags.assert_called_with(
mock.ANY, [fakes.ID_EC2_VPC_1], None)
def test_describe_tags(self):
self.db_api.get_tags.return_value = [{'item_id': fakes.ID_EC2_VPC_1,
'key': 'key1',