mirror of https://github.com/CIRCL/AIL-framework
clean
parent
96a3df42bc
commit
c17b9402f7
|
@ -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:]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue