Fix some pylint warnings in the tests
This commit is contained in:
parent
5fc10563f6
commit
1a1db393c1
|
@ -1,10 +1,11 @@
|
|||
"""Tests for messages"""
|
||||
import unittest
|
||||
from binascii import unhexlify
|
||||
|
||||
from minode import message
|
||||
|
||||
|
||||
magic = 0xE9BEB4D9
|
||||
MAGIC = 0xE9BEB4D9
|
||||
|
||||
# 500 identical peers:
|
||||
# import ipaddress
|
||||
|
@ -26,7 +27,7 @@ class TestMessage(unittest.TestCase):
|
|||
|
||||
def test_packet(self):
|
||||
"""Check the packet created by message.Message()"""
|
||||
head = unhexlify(b'%x' % magic)
|
||||
head = unhexlify(b'%x' % MAGIC)
|
||||
self.assertEqual(
|
||||
message.Message(b'ping', b'').to_bytes()[:len(head)], head)
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
"""Blind tests, starting the minode process"""
|
||||
import unittest
|
||||
import signal
|
||||
import subprocess
|
||||
|
@ -42,7 +43,7 @@ class TestProcessProto(unittest.TestCase):
|
|||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
"""Ensures that pybitmessage stopped and removes files"""
|
||||
"""Ensures that process stopped and removes files"""
|
||||
try:
|
||||
if not cls._stop_process(10):
|
||||
try:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
"""Tests for structures"""
|
||||
import unittest
|
||||
import struct
|
||||
from binascii import unhexlify
|
||||
|
|
Loading…
Reference in New Issue
Block a user