def test_menu_option_9_1_match(self, mock_open, mock_stdout, *args): app = PyMkmApp(self.config) with self.assertLogs(level='DEBUG') as cm: app.start() log_record = cm.records[len(cm.records) - 1] self.assertRegex(log_record.message, r'>> Exited import_from_csv')
def test_menu_option_6(self, mock_stdout, *args): app = PyMkmApp(self.config) app.start() print(mock_stdout.getvalue()) self.assertRegex(mock_stdout.getvalue(), r"This will show items in your ")
def test_menu_option_5(self, mock_stdout, *args): app = PyMkmApp(self.config) app.start() print(mock_stdout.getvalue()) self.assertRegex(mock_stdout.getvalue(), r"{'account':")
def test_menu_option_5(self, mock_stdout, *args): app = PyMkmApp(self.config) app.start() text = mock_stdout.getvalue() self.assertRegex(mock_stdout.getvalue(), r'Top 20 most expensive articles in stock:')
def test_menu_option_8(self, *args): app = PyMkmApp(self.config) with self.assertLogs(level='DEBUG') as cm: app.start() log_record = cm.records[len(cm.records) - 1] self.assertRegex(log_record.message, r'>> Exited clear_entire_stock')
def test_menu_option_4(self, mock_stdout, *args): app = PyMkmApp(self.config) with self.assertLogs(level='DEBUG') as cm: app.start() log_record = cm.records[len(cm.records) - 1] self.assertRegex(log_record.message, r'>> Exited find_deals_from_user')
def test_menu_option_3(self, mock_stdout, *args): app = PyMkmApp(self.config) with self.assertLogs(level='DEBUG') as cm: app.start() log_record = cm.records[len(cm.records) - 1] self.assertRegex(log_record.message, r'>> Exited list_competition_for_product')
def test_menu_option_2(self, mock_open, mock_stdout, *args): app = PyMkmApp(self.config) with self.assertLogs(level='DEBUG') as cm: app.start() log_record = cm.records[len(cm.records) - 1] self.assertRegex(log_record.message, r'>> Exited update_product_to_trend')
def test_main_menu(self, mock_input, mock_stdout, *args): app = PyMkmApp(self.config) app.start() self.assertRegex(mock_stdout.getvalue(), r'╭─── PyMKM')
def main(): app = PyMkmApp() app.start()