def test_main_report_input_negative(self): try: main("asbsd users ravinderassdas", self.class_map) assert False except Exception as e: assert True
def test_main_report_users_at_credit_limit(self, mock_users_at_credit_limit): assert main("report users-at-credit-limit", self.class_map) == "ravinder"
def test_main_report_total_dues(self, mock_total_discount_merchant): assert main("report total-dues", self.class_map) == "total: 300"
def test_main_report_user(self, mock_total_discount_merchant): assert main("report dues ravinder", self.class_map) == 100.27
def test_main_report_user_negative(self): try: main("report dues ravinderassdas", self.class_map) assert False except Exception as e: assert True
def test_main_payback_negative_user(self): try: main("payback ravi 1000", self.class_map) assert False except Exception as e: assert True
def test_main_report_discount(self, mock_total_discount_merchant): assert main("report discount merchant", self.class_map) == 6.25
def test_main_payback_positive(self, mock_check_limit, mock_update_limit): assert main("payback ravinder 1000", self.class_map) == "ravinder(dues:0.0)"
def test_main_payback_negative_limit(self, mock_update_limit): try: main("payback ravinder 1000", self.class_map) assert False except Exception as e: assert True
def test_main_create_update(self, mock_update_discount): assert main("update merchant merchant 10", self.class_map) == True
def test_main_create_update_negative(self): try: main("update merchant masdasda 10", self.class_map) assert False except Exception as e: assert True
def test_main_create_transcation_wrong_input(self): try: main("new 123 ravinderqww merchant 1000", self.class_map) assert False except Exception as e: assert True
def test_main_create_transcation_wrong_merchant(self): try: main("new txn ravinder merchant123 1000", self.class_map) assert False except Exception as e: assert True
def test_main_create_transcation(self, mock_check_transct): assert main("new txn ravinder merchant 1000", self.class_map) == "success"
def test_main_create_user_negative(self): try: main("new user ravinder baid [email protected] 10000", self.class_map) assert False except Exception as e: assert True
def test_main_create_user(self, mock_create_user): assert main("new user ravinder [email protected] 10000", self.class_map) == "ravinder(1000)"