def test_categorize_uncertainty_amount_action_not_plus_or_minus_return_false(self): mock_transaction = mock.MagicMock() mock_category = mock.MagicMock() mock_transaction.amount = 50 mock_category.amount_action = "any-value" self.assertFalse(_categorize_uncertainty(mock_transaction, mock_category))
def test_categorize_uncertainty_no_amount_action_equal_amount_return_true(self): mock_transaction = mock.MagicMock() mock_category = mock.MagicMock() mock_transaction.amount = 100 mock_category.amount = 100 mock_category.amount_action = None self.assertTrue(_categorize_uncertainty(mock_transaction, mock_category))
def test_categorize_uncertainty_amount_action_minus_amount_more_than_category_amount_return_false( self ): mock_transaction = mock.MagicMock() mock_category = mock.MagicMock() mock_transaction.amount = 100 mock_category.amount = 50 mock_category.amount_action = "-" self.assertFalse(_categorize_uncertainty(mock_transaction, mock_category))
def test_categorize_uncertainty_amount_action_plus_transaction_amount_more_than_category_amount_return_true( self ): mock_transaction = mock.MagicMock() mock_category = mock.MagicMock() mock_transaction.amount = 100 mock_category.amount = 50 mock_category.amount_action = "+" self.assertTrue(_categorize_uncertainty(mock_transaction, mock_category))