示例#1
0
class ToolbarTest(unittest.TestCase):
    def setUp(self):
        self.haxor = Haxor()
        self.toolbar = Toolbar(lambda: self.haxor.paginate_comments)

    def test_toolbar_on(self):
        self.haxor.paginate_comments = True
        expected = [
            # (Token.Toolbar.On,
            #  ' [F2] Paginate Comments: {0} '.format('ON')),
            (Token.Toolbar, " [F10] Exit ")
        ]
        assert expected == self.toolbar.handler(None)

    def test_toolbar_off(self):
        self.haxor.paginate_comments = False
        expected = [
            # (Token.Toolbar.Off,
            #  ' [F2] Paginate Comments: {0} '.format('OFF')),
            (Token.Toolbar, " [F10] Exit ")
        ]
        assert expected == self.toolbar.handler(None)
示例#2
0
class ToolbarTest(unittest.TestCase):
    def setUp(self):
        self.haxor = Haxor()
        self.toolbar = Toolbar(lambda: self.haxor.paginate_comments)

    def test_toolbar_on(self):
        self.haxor.paginate_comments = True
        expected = [
            # (Token.Toolbar.On,
            #  ' [F2] Paginate Comments: {0} '.format('ON')),
            (Token.Toolbar, ' [F10] Exit ')
        ]
        assert expected == self.toolbar.handler(None)

    def test_toolbar_off(self):
        self.haxor.paginate_comments = False
        expected = [
            # (Token.Toolbar.Off,
            #  ' [F2] Paginate Comments: {0} '.format('OFF')),
            (Token.Toolbar, ' [F10] Exit ')
        ]
        assert expected == self.toolbar.handler(None)
示例#3
0
 def setUp(self):
     self.haxor = Haxor()
     self.toolbar = Toolbar(lambda: self.haxor.paginate_comments)
示例#4
0
 def setUp(self):
     self.haxor = Haxor()
     self.toolbar = Toolbar(lambda: self.haxor.paginate_comments)