Improve cleanup of test_insert_queue_header_asterisk

Based on current implement, the queue created by
test_insert_queue_header_asterisk won't be deleted.
As a result, develper will run into unit test failure
like 204!=201. This fix will add the headers param to
make sure the queue can be cleaned up.

Closes-Bug: #1284995

Change-Id: If415c4f73604ae0f9d2d37daba3aa3f0ca693b6a
This commit is contained in:
Fei Long Wang 2014-03-26 17:19:39 +08:00
parent 06667a34d4
commit b6efb90a0b

View File

@ -159,10 +159,10 @@ class TestInsertQueue(base.FunctionalTestBase):
def test_insert_queue_header_asterisk(self):
"""Insert Queue with 'Accept': '*/*'."""
path = '/queues/asteriskinheader'
self.addCleanup(self.client.delete, path)
headers = {"Accept": '*/*'}
self.addCleanup(self.client.delete, url=path, headers=headers)
header = {"Accept": '*/*'}
result = self.client.put(path, headers=header)
result = self.client.put(path, headers=headers)
self.assertEqual(result.status_code, 201)
test_insert_queue_header_asterisk.tags = ['positive']