diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2015-01-14 16:28:37 +0100 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2015-01-14 16:28:37 +0100 |
commit | e4a026ec6d49a9aa4cc6455cc3dccc3b46448c4a (patch) | |
tree | bfe7a969bca4de8605ba899e5d5be7a38e90bfbc /app | |
parent | a18d47dae5d25f8046c8bf4d8b9c71e0412f1701 (diff) |
Fix tests.
Change-Id: I7f60484569aff1c33f14dcabb0e3fb9f81771fc5
Diffstat (limited to 'app')
-rw-r--r-- | app/handlers/tests/test_count_handler.py | 16 | ||||
-rw-r--r-- | app/handlers/tests/test_defconf_handler.py | 4 | ||||
-rw-r--r-- | app/handlers/tests/test_job_handler.py | 8 | ||||
-rw-r--r-- | app/handlers/tests/test_lab_handler.py | 2 | ||||
-rw-r--r-- | app/handlers/tests/test_token_handler.py | 2 |
5 files changed, 14 insertions, 18 deletions
diff --git a/app/handlers/tests/test_count_handler.py b/app/handlers/tests/test_count_handler.py index 33db9f7..2e70042 100644 --- a/app/handlers/tests/test_count_handler.py +++ b/app/handlers/tests/test_count_handler.py @@ -94,9 +94,9 @@ class TestCountHandler( def test_get_count_all(self): expected_body = ( - '{"code": 200, "result": [{"count": 0, "collection": "job"}, ' - '{"count": 0, "collection": "boot"}, ' - '{"count": 0, "collection": "defconfig"}]}' + '{"code":200,"result":[{"count":0,"collection":"job"},' + '{"count":0,"collection":"boot"},' + '{"count":0,"collection":"defconfig"}]}' ) headers = {'Authorization': 'foo'} @@ -109,9 +109,9 @@ class TestCountHandler( def test_get_count_all_with_query(self): expected_body = ( - '{"code": 200, "result": [{"count": 0, "collection": "job"}, ' - '{"count": 0, "collection": "boot"}, ' - '{"count": 0, "collection": "defconfig"}]}' + '{"code":200,"result":[{"count":0,"collection":"job"},' + '{"count":0,"collection":"boot"},' + '{"count":0,"collection":"defconfig"}]}' ) headers = {'Authorization': 'foo'} @@ -126,7 +126,7 @@ class TestCountHandler( def test_get_count_collection(self): expected_body = ( - '{"code": 200, "result": [{"count": 0, "collection": "boot"}]}' + '{"code":200,"result":[{"count":0,"collection":"boot"}]}' ) headers = {'Authorization': 'foo'} @@ -139,7 +139,7 @@ class TestCountHandler( def test_get_count_collection_with_query(self): expected_body = ( - '{"code": 200, "result": [{"count": 0, "collection": "boot"}]}' + '{"code":200,"result":[{"count":0,"collection":"boot"}]}' ) headers = {'Authorization': 'foo'} diff --git a/app/handlers/tests/test_defconf_handler.py b/app/handlers/tests/test_defconf_handler.py index 14ff6b6..7664f14 100644 --- a/app/handlers/tests/test_defconf_handler.py +++ b/app/handlers/tests/test_defconf_handler.py @@ -79,9 +79,7 @@ class TestDefconfHandler( mock_count.return_value = 0 mock_find.return_value = [] - expected_body = ( - '{"count": 0, "code": 200, "limit": 0, "result": []}' - ) + expected_body = '{"count":0,"code":200,"limit":0,"result":[]}' headers = {'Authorization': 'foo'} response = self.fetch('/defconfig', headers=headers) diff --git a/app/handlers/tests/test_job_handler.py b/app/handlers/tests/test_job_handler.py index cb70eea..4e2350d 100644 --- a/app/handlers/tests/test_job_handler.py +++ b/app/handlers/tests/test_job_handler.py @@ -77,7 +77,7 @@ class TestJobHandler( mock_count.return_value = 0 mock_find.return_value = [] - expected_body = '{"count": 0, "code": 200, "limit": 0, "result": []}' + expected_body = '{"count":0,"code":200,"limit":0,"result":[]}' headers = {'Authorization': 'foo'} response = self.fetch('/job?date_range=5&job=job', headers=headers) @@ -93,9 +93,7 @@ class TestJobHandler( mock_count.return_value = 0 mock_find.return_value = [] - expected_body = ( - '{"count": 0, "code": 200, "limit": 1024, "result": []}' - ) + expected_body = '{"count":0,"code":200,"limit":1024,"result":[]}' headers = {'Authorization': 'foo'} response = self.fetch('/job?limit=1024', headers=headers) @@ -140,7 +138,7 @@ class TestJobHandler( collection.find_one = mock.MagicMock() collection.find_one.return_value = {'_id': 'foo'} - expected_body = '{"code": 200, "result": [{"_id": "foo"}]}' + expected_body = '{"code":200,"result":[{"_id":"foo"}]}' headers = {'Authorization': 'foo'} response = self.fetch('/job/job-kernel', headers=headers) diff --git a/app/handlers/tests/test_lab_handler.py b/app/handlers/tests/test_lab_handler.py index 9d067b6..1bcc9e7 100644 --- a/app/handlers/tests/test_lab_handler.py +++ b/app/handlers/tests/test_lab_handler.py @@ -398,7 +398,7 @@ class TestLabHandler( mock_id.return_value = "lab-01" expected_body = ( - '{"code": 200, "result": [{"_id": "foo", "name": "lab-01"}]}' + '{"code":200,"result":[{"_id":"foo","name":"lab-01"}]}' ) headers = {'Authorization': 'foo'} diff --git a/app/handlers/tests/test_token_handler.py b/app/handlers/tests/test_token_handler.py index bcf6802..d94a264 100644 --- a/app/handlers/tests/test_token_handler.py +++ b/app/handlers/tests/test_token_handler.py @@ -85,7 +85,7 @@ class TestTokenHandler(testing.AsyncHTTPTestCase, testing.LogTrapTestCase): mock_count.return_value = 0 mock_find.return_value = [] - expected_body = '{"count": 0, "code": 200, "limit": 0, "result": []}' + expected_body = '{"count":0,"code":200,"limit":0,"result":[]}' headers = {'Authorization': 'foo'} response = self.fetch('/token', headers=headers) |