pull/201/head
Terrtia 2018-05-04 14:25:47 +02:00
parent 96a3df42bc
commit c17b9402f7
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
4 changed files with 10 additions and 8 deletions

View File

@ -723,10 +723,6 @@ def format_string(tab, padding_row):
text="" text=""
for ite, elem in enumerate(the_array): for ite, elem in enumerate(the_array):
try:
elem = elem.decode('utf8')
except AttributeError:
pass
if len(elem) > padding_row[ite]: if len(elem) > padding_row[ite]:
text += "*" + elem[-padding_row[ite]+6:] text += "*" + elem[-padding_row[ite]+6:]

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import unittest import unittest

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import sys,os import sys,os
@ -10,7 +10,7 @@ sys.path.append(os.environ['AIL_BIN'])
from packages.Paste import Paste from packages.Paste import Paste
import Keys as Keys import Keys as Keys
from Helper import Process from Helper import Process
import pubsublogger from pubsublogger import publisher
class TestKeysModule(unittest.TestCase): class TestKeysModule(unittest.TestCase):
@ -28,3 +28,9 @@ class TestKeysModule(unittest.TestCase):
def test_search_key(self): def test_search_key(self):
with self.assertRaises(pubsublogger.exceptions.NoChannelError): with self.assertRaises(pubsublogger.exceptions.NoChannelError):
Keys.search_key(self.paste) Keys.search_key(self.paste)
def test_search_key(self):
with self.assertRaises(NameError):
publisher.port = 6380
publisher.channel = 'Script'
Keys.search_key(self.paste)

View File

@ -115,7 +115,7 @@ def providersChart():
# Member set is a list of (value, score) pairs # Member set is a list of (value, score) pairs
if len(member_set) == 0: if len(member_set) == 0:
member_set_str.append(("No relevant data", float(100))) member_set.append(("No relevant data", float(100)))
return jsonify(member_set) return jsonify(member_set)