Пример #1
0
class ConsoleOnlinePluginTestCase(TankTestCase):
    def setUp(self):
        core = self.get_core()
        core.load_configs(['config/console.conf'])
        core.load_plugins()
        self.foo = ConsoleOnlinePlugin(core)
        self.foo.console_markup = FakeConsoleMarkup()

    def tearDown(self):
        del self.foo
        self.foo = None

    def test_run(self):
        self.data = self.get_aggregate_data('data/preproc_single2.txt')
        self.foo.set_option('disable_colors', 'WHITE')
        self.foo.configure()
        self.foo.prepare_test()
        self.foo.add_info_widget(TestWidget())
        self.foo.add_info_widget(TestWidget2())

        self.foo.start_test()
        k = krutilka()
        for i in range(1, 10):
            print k.next()
            self.foo.aggregate_second(self.data)
        self.foo.end_test(0)
        self.assertFalse(self.foo.render_exception)
Пример #2
0
class ConsoleOnlinePluginTestCase(TankTestCase):
    def setUp(self):
        core = self.get_core()
        core.load_configs(['config/console.conf'])
        core.load_plugins()
        self.foo = ConsoleOnlinePlugin(core)
        self.foo.console_markup = FakeConsoleMarkup()

    def tearDown(self):
        del self.foo
        self.foo = None 

    def test_run(self):
        self.data = self.get_aggregate_data('data/preproc_single2.txt')
        self.foo.set_option('disable_colors', 'WHITE')
        self.foo.configure()
        self.foo.prepare_test()
        self.foo.add_info_widget(TestWidget())
        self.foo.add_info_widget(TestWidget2())
        
        self.foo.start_test()
        for i in range(1, 10):
            self.foo.aggregate_second(self.data)
        self.foo.end_test(0)
        self.assertFalse(self.foo.render_exception)