Skip to content

Commit

Permalink
Lint remaining files
Browse files Browse the repository at this point in the history
  • Loading branch information
kronolynx committed Feb 7, 2017
1 parent 2bbb2a5 commit d427d3b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def welcome(self):
def choose_test(self, *_):
txt = urwid.Text(
[('text bold',
self.app.name),
' provides two distinct test suites covering security in different '
'depth. Please choose which one you want to run:'])
self.app.name),
' provides two distinct test suites covering security in different '
'depth. Please choose which one you want to run:'])

basic = ImageButton(
picRead('bars_min.bmp'),
Expand Down
6 changes: 3 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sys
import urwid
from src.cards import Cards
from src.palette import palette
from src.palette import PALETTE
from src.tools import check_version


Expand All @@ -23,7 +23,7 @@ def __init__(self):
def setup_view(self):
placeholder = urwid.SolidFill()
self.loop = urwid.MainLoop(
placeholder, palette, unhandled_input=self.key_handler)
placeholder, PALETTE, unhandled_input=self.key_handler)
self.loop.widget = urwid.AttrMap(placeholder, 'bg')
self.loop.widget._command_map['tab'] = 'cursor down'
self.loop.widget._command_map['shift tab'] = 'cursor up'
Expand Down Expand Up @@ -57,7 +57,7 @@ def main(self):
except KeyboardInterrupt:
return 0

def main(args=None):
def main():
App().main()

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion src/palette.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

palette = [
PALETTE = [
('bg', '', '', '', 'black', 'g93'),
('header', '', '', '', '#fff', '#d00'),
('h1', '', '', '', '#fff,bold', '#d00'),
Expand Down
15 changes: 8 additions & 7 deletions src/test_mongo.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import unittest

from tools import *
from testers import *
from src.testers import alerts_aug152013, alerts_dec012015, alerts_feb252015, alerts_jun052013, \
alerts_jun172014, alerts_jun202013, alerts_mar062014, alerts_mar252015, alerts_mar272015, \
alerts_may052014, alerts_oct012013


class MongoauditTest(unittest.TestCase):

def create_type(self, **kwargs):
@staticmethod
def create_type(**kwargs):
return type("mock", (object,), kwargs)

def info_obj(self, info):
Expand All @@ -15,12 +16,12 @@ def info_obj(self, info):
def ver_obj(self, ver):
return self.info_obj({"version": ver})


def test_alert1(self):
self.assertFalse(alerts_dec012015(self.info_obj({"version": "3.0.3", "modules":["enterprise"]})))
self.assertFalse(
alerts_dec012015(self.info_obj({"version": "3.0.3", "modules": ["enterprise"]})))

def test_alert1_1(self):
self.assertTrue(alerts_dec012015(self.info_obj({"version": "3.0.2", "modules":["rock"]})))
self.assertTrue(alerts_dec012015(self.info_obj({"version": "3.0.2", "modules": ["rock"]})))

def test_alert2(self):
self.assertFalse(alerts_mar272015(self.ver_obj("3.0.0")))
Expand Down
2 changes: 1 addition & 1 deletion src/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def test_display(test, options):
def get_top_text(self):
"""
Returns:
tuple(str,str): palette , Test n/total
tuple(str,str): PALETTE , Test n/total
"""
return 'header red', 'Test ' + \
str(self.currently_displayed) + '/' + str(self.total)
Expand Down

0 comments on commit d427d3b

Please sign in to comment.