pycodestyle
This commit is contained in:
parent
efd34b0fd0
commit
b6cd1d37b8
2 changed files with 4 additions and 3 deletions
|
@ -99,6 +99,7 @@ class TestSchleuderApi(unittest.TestCase):
|
||||||
def _mock_api(self, mock):
|
def _mock_api(self, mock):
|
||||||
m = MagicMock()
|
m = MagicMock()
|
||||||
m.getcode.return_value = 200
|
m.getcode.return_value = 200
|
||||||
|
|
||||||
def read():
|
def read():
|
||||||
url = mock.call_args_list[-1][0][0].get_full_url()
|
url = mock.call_args_list[-1][0][0].get_full_url()
|
||||||
if 'lists.json' in url:
|
if 'lists.json' in url:
|
||||||
|
@ -138,7 +139,7 @@ class TestSchleuderApi(unittest.TestCase):
|
||||||
self.assertEqual('foo@example.org', subs[0].email)
|
self.assertEqual('foo@example.org', subs[0].email)
|
||||||
self.assertEqual(42, subs[0].schleuder)
|
self.assertEqual(42, subs[0].schleuder)
|
||||||
self.assertEqual(datetime(2022, 4, 15, 1, 11, 12, 123000, tzinfo=tzutc()),
|
self.assertEqual(datetime(2022, 4, 15, 1, 11, 12, 123000, tzinfo=tzutc()),
|
||||||
subs[0].created_at)
|
subs[0].created_at)
|
||||||
self.assertEqual('2FBBC0DF97FDBF1E4B704EEDE39EF4FAC420BEB6', subs[0].key.fingerprint)
|
self.assertEqual('2FBBC0DF97FDBF1E4B704EEDE39EF4FAC420BEB6', subs[0].key.fingerprint)
|
||||||
self.assertEqual('foo@example.org', subs[0].key.email)
|
self.assertEqual('foo@example.org', subs[0].key.email)
|
||||||
self.assertIn('-----BEGIN PGP PUBLIC KEY BLOCK-----', subs[0].key.blob)
|
self.assertIn('-----BEGIN PGP PUBLIC KEY BLOCK-----', subs[0].key.blob)
|
||||||
|
@ -231,4 +232,3 @@ class TestSchleuderApi(unittest.TestCase):
|
||||||
api.get_subscribers(sch)
|
api.get_subscribers(sch)
|
||||||
api.get_key('2FBBC0DF97FDBF1E4B704EEDE39EF4FAC420BEB6', sch)
|
api.get_key('2FBBC0DF97FDBF1E4B704EEDE39EF4FAC420BEB6', sch)
|
||||||
self.assertLess(0, len(mock.call_args_list))
|
self.assertLess(0, len(mock.call_args_list))
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,8 @@ import unittest
|
||||||
from dateutil.tz import tzutc
|
from dateutil.tz import tzutc
|
||||||
|
|
||||||
from multischleuder.types import SchleuderKey, SchleuderList, SchleuderSubscriber
|
from multischleuder.types import SchleuderKey, SchleuderList, SchleuderSubscriber
|
||||||
from multischleuder.test.test_api import _KEY_RESPONSE,_LIST_RESPONSE, _SUBSCRIBER_RESPONSE
|
from multischleuder.test.test_api import _KEY_RESPONSE, _LIST_RESPONSE, _SUBSCRIBER_RESPONSE
|
||||||
|
|
||||||
|
|
||||||
class TestSchleuderTypes(unittest.TestCase):
|
class TestSchleuderTypes(unittest.TestCase):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue