mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
clean
This commit is contained in:
parent
96a3df42bc
commit
c17b9402f7
4 changed files with 10 additions and 8 deletions
|
@ -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:]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue