Compare commits

2 Commits

Author SHA1 Message Date
e56754a49c Merge pull request 'FIX: tests: satisfy new version of pylint' (#12) from heinzel into master
All checks were successful
buildbot/python3-test Build done.
buildbot/python2-test Build done.
2020-05-04 12:21:40 +02:00
cfe1b4e8cc FIX: tests: satisfy new version of pylint
All checks were successful
buildbot/python3-test Build done.
buildbot/python2-test Build done.
2020-05-04 11:38:27 +02:00

View File

@@ -28,15 +28,8 @@ class RootUnitTestCase(unittest.TestCase):
real_hostname = socket.gethostname()
for test_data in test_data_sets:
if 'hostname' in test_data:
hostname = test_data['hostname']
else:
hostname = real_hostname
if 'expected_color_hex' in test_data:
expected_color_hex = test_data['expected_color_hex']
else:
expected_color_hex = default_color_hex
hostname = test_data.get('hostname', real_hostname)
expected_color_hex = test_data.get('expected_color_hex', default_color_hex)
with mock.patch('socket.gethostname', return_value=hostname):
view = RootView()