aboutsummaryrefslogtreecommitdiff
path: root/tests/test_pandora/test_transport.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_pandora/test_transport.py')
-rw-r--r--tests/test_pandora/test_transport.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_pandora/test_transport.py b/tests/test_pandora/test_transport.py
index 08e3292..ff9c572 100644
--- a/tests/test_pandora/test_transport.py
+++ b/tests/test_pandora/test_transport.py
@@ -164,7 +164,7 @@ class TestParseResponse(TestCase):
164 164
165 def test_with_valid_response(self): 165 def test_with_valid_response(self):
166 res = self.transport._parse_response(self.VALID_MSG_JSON) 166 res = self.transport._parse_response(self.VALID_MSG_JSON)
167 self.assertEqual({ "foo": "bar" }, res) 167 self.assertEqual({"foo": "bar"}, res)
168 168
169 def test_with_valid_response_no_body(self): 169 def test_with_valid_response_no_body(self):
170 res = self.transport._parse_response(self.VALID_MSG_NO_BODY_JSON) 170 res = self.transport._parse_response(self.VALID_MSG_NO_BODY_JSON)
@@ -208,9 +208,9 @@ class TestTransportRequestPrep(TestCase):
208 208
209 self.transport._http = http 209 self.transport._http = http
210 res = self.transport._make_http_request( 210 res = self.transport._make_http_request(
211 "/url", b"data", { "a":None, "b":"c" }) 211 "/url", b"data", {"a": None, "b": "c"})
212 212
213 http.post.assert_called_with("/url", data=b"data", params={"b":"c"}) 213 http.post.assert_called_with("/url", data=b"data", params={"b": "c"})
214 retval.raise_for_status.assert_called_with() 214 retval.raise_for_status.assert_called_with()
215 215
216 self.assertEqual("foo", res) 216 self.assertEqual("foo", res)
@@ -223,7 +223,7 @@ class TestTransportRequestPrep(TestCase):
223 self.transport.start_time = 23 223 self.transport.start_time = 23
224 224
225 with patch.object(time, "time", return_value=20): 225 with patch.object(time, "time", return_value=20):
226 val = self.transport._build_data("foo", {"a":"b", "c":None}) 226 val = self.transport._build_data("foo", {"a": "b", "c": None})
227 227
228 val = json.loads(val) 228 val = json.loads(val)
229 self.assertEqual("b", val["a"]) 229 self.assertEqual("b", val["a"])
@@ -238,7 +238,7 @@ class TestTransportRequestPrep(TestCase):
238 238
239 with patch.object(time, "time", return_value=20): 239 with patch.object(time, "time", return_value=20):
240 val = self.transport._build_data( 240 val = self.transport._build_data(
241 t.APITransport.NO_ENCRYPT[0], {"a":"b", "c":None}) 241 t.APITransport.NO_ENCRYPT[0], {"a": "b", "c": None})
242 242
243 val = json.loads(val) 243 val = json.loads(val)
244 self.assertEqual("b", val["a"]) 244 self.assertEqual("b", val["a"])
@@ -324,7 +324,7 @@ class TestEncryptor(TestCase):
324 324
325 def test_decrypt(self): 325 def test_decrypt(self):
326 self.assertEqual( 326 self.assertEqual(
327 { "foo": "bar" }, self.cryptor.decrypt(self.ENCODED_JSON)) 327 {"foo": "bar"}, self.cryptor.decrypt(self.ENCODED_JSON))
328 328
329 def test_encrypt(self): 329 def test_encrypt(self):
330 self.assertEqual( 330 self.assertEqual(