Apply pylint's linting rules to bfxapi/tests/*.py.

This commit is contained in:
Davide Casale
2023-03-06 18:49:22 +01:00
parent 5c707d7929
commit af25f25d3b
10 changed files with 66 additions and 55 deletions

View File

@@ -11,15 +11,19 @@ class TestNotification(unittest.TestCase):
A: int
B: float
C: str
test = generate_labeler_serializer("Test", Test,
test = generate_labeler_serializer("Test", Test,
[ "A", "_PLACEHOLDER", "B", "_PLACEHOLDER", "C" ])
notification = _Notification[Test](test)
self.assertEqual(notification.parse(*[1675787861506, "test", None, None, [ 5, None, 65.0, None, "X" ], 0, "SUCCESS", "This is just a test notification."]),
Notification[Test](1675787861506, "test", None, Test(5, 65.0, "X"), 0, "SUCCESS", "This is just a test notification."),
msg="_Notification should produce the right notification.")
actual = notification.parse(*[ 1675787861506, "test", None, None, [ 5, None, 65.0, None, "X" ], \
0, "SUCCESS", "This is just a test notification." ])
expected = Notification[Test](1675787861506, "test", None, Test(5, 65.0, "X"),
0, "SUCCESS", "This is just a test notification.")
self.assertEqual(actual, expected, msg="_Notification should produce the right notification.")
if __name__ == "__main__":
unittest.main()
unittest.main()