示例#1
0
 def test_validate_args_where_item_and_action_are_none(self):
     # initialize
     expected_result = "NO_ITEM"
     invoice = Invoice()
     invoice.args = ArgsMock()
     # test
     result = invoice.validate_args()
     # verify
     self.assertEqual(result, expected_result)
     return
示例#2
0
 def test_validate_args_where_action_is_none(self):
     # initialize
     expected_result = "NO_ACTION"
     invoice = Invoice()
     invoice.args = ArgsMock()
     invoice.args.item = "company"
     # test
     result = invoice.validate_args()
     # verify
     self.assertEqual(result, expected_result)
     return
示例#3
0
 def test_validate_args_where_item_and_action_are_set_to_valid_values(self):
     # initialize
     expected_result = ""
     invoice = Invoice()
     invoice.args = ArgsMock()
     invoice.args.item = "company"
     invoice.args.action = "add"
     # test
     result = invoice.validate_args()
     # verify
     self.assertEqual(result, expected_result)
     return