This commit is contained in:
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=""
for ite, elem in enumerate(the_array):
try:
elem = elem.decode('utf8')
except AttributeError:
pass
if len(elem) > padding_row[ite]:
text += "*" + elem[-padding_row[ite]+6:]

View file

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

View file

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