From 57b35d5758411f964f5df395e9cd8ddeae5e5019 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sun, 1 Feb 2015 17:22:31 -0700 Subject: [PATCH] Fix tests + PEP8 + documentation --- docs/api/examples/get_virtualboxuuid.txt | 2 +- docs/api/examples/get_vpcsuuid.txt | 2 +- docs/api/examples/post_virtualbox.txt | 2 +- docs/api/examples/post_vpcs.txt | 2 +- docs/api/examples/put_projectuuid.txt | 4 ++-- scripts/pep8.sh | 2 +- tests/api/test_version.py | 3 ++- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/api/examples/get_virtualboxuuid.txt b/docs/api/examples/get_virtualboxuuid.txt index a482bfd4..739e864d 100644 --- a/docs/api/examples/get_virtualboxuuid.txt +++ b/docs/api/examples/get_virtualboxuuid.txt @@ -21,6 +21,6 @@ X-ROUTE: /virtualbox/{uuid} "headless": false, "name": "VMTEST", "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "uuid": "7d0bf59f-0a8c-4382-b5ed-23902653d8c5", + "uuid": "0d15855e-8fb4-41af-81b0-a150c7576d5a", "vmname": "VMTEST" } diff --git a/docs/api/examples/get_vpcsuuid.txt b/docs/api/examples/get_vpcsuuid.txt index c45b8878..61a263a0 100644 --- a/docs/api/examples/get_vpcsuuid.txt +++ b/docs/api/examples/get_vpcsuuid.txt @@ -18,5 +18,5 @@ X-ROUTE: /vpcs/{uuid} "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "script_file": null, "startup_script": null, - "uuid": "5af7ac19-3064-4c8d-8355-fb0c933bbf37" + "uuid": "2ddb0fa3-1010-4f48-b295-caa1c414b4a2" } diff --git a/docs/api/examples/post_virtualbox.txt b/docs/api/examples/post_virtualbox.txt index 60213f89..25c025f8 100644 --- a/docs/api/examples/post_virtualbox.txt +++ b/docs/api/examples/post_virtualbox.txt @@ -26,6 +26,6 @@ X-ROUTE: /virtualbox "headless": false, "name": "VM1", "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "uuid": "4cdea9da-6611-44c3-a085-a3bc4dae7883", + "uuid": "33217631-7c24-4acf-b462-c40e0012537a", "vmname": "VM1" } diff --git a/docs/api/examples/post_vpcs.txt b/docs/api/examples/post_vpcs.txt index 4f23a01a..75186c33 100644 --- a/docs/api/examples/post_vpcs.txt +++ b/docs/api/examples/post_vpcs.txt @@ -21,5 +21,5 @@ X-ROUTE: /vpcs "project_uuid": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "script_file": null, "startup_script": null, - "uuid": "2cefa3e7-6867-4282-a606-c42d94c7852e" + "uuid": "b0ed8aae-4d50-4a0c-9d91-0875a5aca533" } diff --git a/docs/api/examples/put_projectuuid.txt b/docs/api/examples/put_projectuuid.txt index 472b1d5e..d629a7c1 100644 --- a/docs/api/examples/put_projectuuid.txt +++ b/docs/api/examples/put_projectuuid.txt @@ -15,7 +15,7 @@ SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /project/{uuid} { - "location": "/tmp/tmpjan_7gw5", + "location": "/tmp/tmpi95b_dec", "temporary": false, - "uuid": "88146503-b509-40a4-ae43-0f17100c767a" + "uuid": "e30bf585-b257-4e14-8f7f-a5e0bdd126dd" } diff --git a/scripts/pep8.sh b/scripts/pep8.sh index ea0694f5..33e0f54a 100755 --- a/scripts/pep8.sh +++ b/scripts/pep8.sh @@ -16,4 +16,4 @@ echo ' find . -name '*.py' -exec autopep8 --in-place -v --aggressive --aggressive \{\} \; -echo "Its 'clean" +echo "It's all clean now!" diff --git a/tests/api/test_version.py b/tests/api/test_version.py index 1e9260f2..0691d8f9 100644 --- a/tests/api/test_version.py +++ b/tests/api/test_version.py @@ -40,7 +40,8 @@ def test_version_invalid_input(server): query = {'version': "0.4.2"} response = server.post('/version', query) assert response.status == 409 - assert response.json == {'message': '409: Invalid version', 'status': 409} + assert response.json == {'message': 'Client version 0.4.2 differs with server version {}'.format(__version__), + 'status': 409} def test_version_invalid_input_schema(server):