libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [10/17] libcloud git commit: flake8 the tests code
Date Mon, 21 Mar 2016 10:23:19 GMT
flake8 the tests code


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/fb10ec34
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/fb10ec34
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/fb10ec34

Branch: refs/heads/trunk
Commit: fb10ec34324b43ff84da5299f8043ff4bc0ee982
Parents: 2463fb8
Author: lostbird <lostbird@lostbird.(none)>
Authored: Tue Mar 15 23:03:04 2016 +0100
Committer: anthony-shaw <anthony.p.shaw@gmail.com>
Committed: Mon Mar 21 21:20:31 2016 +1100

----------------------------------------------------------------------
 .../dns/fixtures/nsone/create_zone_success.json |  2 +-
 .../dns/fixtures/nsone/empty_zones_list.json    |  2 +-
 .../dns/fixtures/nsone/get_record_success.json  |  2 +-
 .../dns/fixtures/nsone/get_zone_success.json    |  2 +-
 .../dns/fixtures/nsone/list_records_empty.json  |  2 +-
 .../test/dns/fixtures/nsone/list_zones.json     |  2 +-
 .../fixtures/nsone/record_does_not_exist.json   |  2 +-
 .../dns/fixtures/nsone/zone_already_exists.json |  2 +-
 .../dns/fixtures/nsone/zone_does_not_exist.json |  2 +-
 libcloud/test/dns/test_nsone.py                 | 46 +++++++++++++-------
 10 files changed, 39 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/fb10ec34/libcloud/test/dns/fixtures/nsone/create_zone_success.json
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/nsone/create_zone_success.json b/libcloud/test/dns/fixtures/nsone/create_zone_success.json
index bc20afe..562453b 100644
--- a/libcloud/test/dns/fixtures/nsone/create_zone_success.json
+++ b/libcloud/test/dns/fixtures/nsone/create_zone_success.json
@@ -35,4 +35,4 @@
     }
   ],
   "meta": {}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fb10ec34/libcloud/test/dns/fixtures/nsone/empty_zones_list.json
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/nsone/empty_zones_list.json b/libcloud/test/dns/fixtures/nsone/empty_zones_list.json
index 0637a08..fe51488 100644
--- a/libcloud/test/dns/fixtures/nsone/empty_zones_list.json
+++ b/libcloud/test/dns/fixtures/nsone/empty_zones_list.json
@@ -1 +1 @@
-[]
\ No newline at end of file
+[]

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fb10ec34/libcloud/test/dns/fixtures/nsone/get_record_success.json
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/nsone/get_record_success.json b/libcloud/test/dns/fixtures/nsone/get_record_success.json
index 9644017..74d3155 100644
--- a/libcloud/test/dns/fixtures/nsone/get_record_success.json
+++ b/libcloud/test/dns/fixtures/nsone/get_record_success.json
@@ -114,4 +114,4 @@
   ],
   "ttl": 60,
   "use_client_subnet": true
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fb10ec34/libcloud/test/dns/fixtures/nsone/get_zone_success.json
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/nsone/get_zone_success.json b/libcloud/test/dns/fixtures/nsone/get_zone_success.json
index 25a5800..7313bd4 100644
--- a/libcloud/test/dns/fixtures/nsone/get_zone_success.json
+++ b/libcloud/test/dns/fixtures/nsone/get_zone_success.json
@@ -45,4 +45,4 @@
     }
   ],
   "meta": {}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fb10ec34/libcloud/test/dns/fixtures/nsone/list_records_empty.json
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/nsone/list_records_empty.json b/libcloud/test/dns/fixtures/nsone/list_records_empty.json
index 6d6c8c9..9abb003 100644
--- a/libcloud/test/dns/fixtures/nsone/list_records_empty.json
+++ b/libcloud/test/dns/fixtures/nsone/list_records_empty.json
@@ -21,4 +21,4 @@
   },
   "records": [],
   "meta": {}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fb10ec34/libcloud/test/dns/fixtures/nsone/list_zones.json
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/nsone/list_zones.json b/libcloud/test/dns/fixtures/nsone/list_zones.json
index 8d7433a..4eb1ed4 100644
--- a/libcloud/test/dns/fixtures/nsone/list_zones.json
+++ b/libcloud/test/dns/fixtures/nsone/list_zones.json
@@ -37,4 +37,4 @@
     "meta": {},
     "hostmaster": "hostmaster@nsone.net"
   }
-]
\ No newline at end of file
+]

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fb10ec34/libcloud/test/dns/fixtures/nsone/record_does_not_exist.json
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/nsone/record_does_not_exist.json b/libcloud/test/dns/fixtures/nsone/record_does_not_exist.json
index 0aef49e..f1f6230 100644
--- a/libcloud/test/dns/fixtures/nsone/record_does_not_exist.json
+++ b/libcloud/test/dns/fixtures/nsone/record_does_not_exist.json
@@ -1 +1 @@
-{"message":"record not found"}
\ No newline at end of file
+{"message":"record not found"}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fb10ec34/libcloud/test/dns/fixtures/nsone/zone_already_exists.json
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/nsone/zone_already_exists.json b/libcloud/test/dns/fixtures/nsone/zone_already_exists.json
index 3340a53..e556286 100644
--- a/libcloud/test/dns/fixtures/nsone/zone_already_exists.json
+++ b/libcloud/test/dns/fixtures/nsone/zone_already_exists.json
@@ -1 +1 @@
-{"message":"zone already exists"}
\ No newline at end of file
+{"message":"zone already exists"}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fb10ec34/libcloud/test/dns/fixtures/nsone/zone_does_not_exist.json
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/nsone/zone_does_not_exist.json b/libcloud/test/dns/fixtures/nsone/zone_does_not_exist.json
index ffe02d2..4e95409 100644
--- a/libcloud/test/dns/fixtures/nsone/zone_does_not_exist.json
+++ b/libcloud/test/dns/fixtures/nsone/zone_does_not_exist.json
@@ -1 +1 @@
-{"message":"zone not found"}
\ No newline at end of file
+{"message":"zone not found"}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fb10ec34/libcloud/test/dns/test_nsone.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_nsone.py b/libcloud/test/dns/test_nsone.py
index f3c16f7..183a743 100644
--- a/libcloud/test/dns/test_nsone.py
+++ b/libcloud/test/dns/test_nsone.py
@@ -7,7 +7,7 @@ from libcloud.test.secrets import DNS_PARAMS_NSONE
 from libcloud.dns.drivers.nsone import NsOneDNSDriver
 from libcloud.utils.py3 import httplib
 from libcloud.dns.types import ZoneDoesNotExistError, ZoneAlreadyExistsError,\
-    RecordDoesNotExistError, RecordAlreadyExistsError, RecordType
+    RecordDoesNotExistError,  RecordType
 from libcloud.dns.base import Zone, Record
 
 
@@ -102,7 +102,7 @@ class NsOneTests(unittest.TestCase):
             self.fail('Exception was not thrown')
 
     def test_get_record_record_does_not_exist(self):
-        NsOneMockHttp.type = 'GET_RECORD_RECORD_DOES_NOT_EXIST'
+        NsOneMockHttp.type = 'GET_RECORD_DOES_NOT_EXIST'
 
         try:
             self.driver.get_record(zone_id='getrecord.com', record_id='A')
@@ -180,72 +180,86 @@ class NsOneMockHttp(MockHttp):
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_getzone_com_GET_ZONE_SUCCESS(self, method, url, body, headers):
+    def _v1_zones_getzone_com_GET_ZONE_SUCCESS(self, method, url, body,
+                                               headers):
         body = self.fixtures.load('get_zone_success.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_zonedoesnotexist_com_GET_ZONE_ZONE_DOES_NOT_EXIST(self, method, url, body,
headers):
+    def _v1_zones_zonedoesnotexist_com_GET_ZONE_ZONE_DOES_NOT_EXIST(
+            self, method, url, body, headers):
         body = self.fixtures.load('zone_does_not_exist.json')
 
         return 404, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_test_com_DELETE_ZONE_SUCCESS(self, method, url, body, headers):
+    def _v1_zones_test_com_DELETE_ZONE_SUCCESS(
+            self, method, url, body, headers):
         body = self.fixtures.load('delete_zone_success.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_test_com_DELETE_ZONE_ZONE_DOES_NOT_EXIST(self, method, url, body, headers):
+    def _v1_zones_test_com_DELETE_ZONE_ZONE_DOES_NOT_EXIST(
+            self, method, url, body, headers):
         body = self.fixtures.load('zone_does_not_exist.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_newzone_com_CREATE_ZONE_SUCCESS(self, method, url, body, headers):
+    def _v1_zones_newzone_com_CREATE_ZONE_SUCCESS(self, method,
+                                                  url, body, headers):
         body = self.fixtures.load('create_zone_success.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_newzone_com_CREATE_ZONE_ZONE_ALREADY_EXISTS(self, method, url, body, headers):
+    def _v1_zones_newzone_com_CREATE_ZONE_ZONE_ALREADY_EXISTS(
+            self, method, url, body, headers):
         body = self.fixtures.load('zone_already_exists.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_test_com_LIST_RECORDS_SUCCESS(self, method, url, body, headers):
+    def _v1_zones_test_com_LIST_RECORDS_SUCCESS(
+            self, method, url, body, headers):
         body = self.fixtures.load('get_zone_success.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_test_com_LIST_RECORDS_EMPTY(self, method, url, body, headers):
+    def _v1_zones_test_com_LIST_RECORDS_EMPTY(
+            self, method, url, body, headers):
         body = self.fixtures.load('list_records_empty.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_test_com_LIST_RECORDS_ZONE_DOES_NOT_EXIST(self, method, url, body, headers):
+    def _v1_zones_test_com_LIST_RECORDS_ZONE_DOES_NOT_EXIST(
+            self, method, url, body, headers):
         body = self.fixtures.load('zone_does_not_exist.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_test_com_example_com_A_DELETE_RECORD_RECORD_DOES_NOT_EXIST(self, method,
url, body, headers):
+    def _v1_zones_test_com_example_com_A_DELETE_RECORD_RECORD_DOES_NOT_EXIST(
+            self, method, url, body, headers):
         body = self.fixtures.load('record_does_not_exist.json')
 
         return 404, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_test_com_example_com_A_DELETE_RECORD_SUCCESS(self, method, url, body, headers):
+    def _v1_zones_test_com_example_com_A_DELETE_RECORD_SUCCESS(
+            self, method, url, body, headers):
         body = self.fixtures.load('delete_record_success.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_getrecord_com_getrecord_com_A_GET_RECORD_SUCCESS(self, method, url, body,
headers):
+    def _v1_zones_getrecord_com_getrecord_com_A_GET_RECORD_SUCCESS(
+            self, method, url, body, headers):
         body = self.fixtures.load('get_record_success.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_getrecord_com_GET_RECORD_SUCCESS(self, method, url, body, headers):
+    def _v1_zones_getrecord_com_GET_RECORD_SUCCESS(
+            self, method, url, body, headers):
         body = self.fixtures.load('get_zone_success.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]
 
-    def _v1_zones_getrecord_com_getrecord_com_A_GET_RECORD_RECORD_DOES_NOT_EXIST(self, method,
url, body, headers):
+    def _v1_zones_getrecord_com_getrecord_com_A_GET_RECORD_DOES_NOT_EXIST(
+            self, method, url, body, headers):
         body = self.fixtures.load('record_does_not_exist.json')
 
         return httplib.OK, body, {}, httplib.responses[httplib.OK]


Mime
View raw message