def test_compare_text_when_equal(self): # Expecting True when lookup_path is valid, compare method is text and a == b result = model_evaluation.compare( self.a_text, self.b_text, self.text_field, self.lookup_path) assert result == True
def test_compare_text_when_not_equal(self): # Expecting False when lookup_path is valid, compare method is text and a != b result = model_evaluation.compare( self.a_text, "Hi there", self.text_field, self.lookup_path) assert result == False
def test_compare_date_when_wrong_compare_method(self): # Expecting False when lookup_path is valid, compare method is text and a == b but a and b are dates result = model_evaluation.compare( self.a_date, self.b_date, self.text_field, self.lookup_path) assert result == False
def test_compare_date_when_invalid_lookup_path(self): # Expecting False when lookup_path is invalid, compare method is date and a == b result = model_evaluation.compare( self.a_date, self.b_date, self.date_field, "test") assert result == False
def test_compare_date_when_not_equal(self): # Expecting False when lookup_path is valid, compare method is date and a != b result = model_evaluation.compare( self.a_date, "09/10/2018", self.date_field, self.lookup_path) assert result == False
def test_compare_date_when_equal(self): # Expecting True when lookup_path is valid, compare method is date and a == b result = model_evaluation.compare( self.a_date, self.b_date, self.date_field, self.lookup_path) assert result == True
def test_compare_money_when_not_equal(self): # Expecting False when lookup_path is valid, compare method is money and a != b result = model_evaluation.compare( self.a_money, "3206", self.money_field, self.lookup_path) assert result == False
def test_compare_money_when_equal(self): # Expecting True when lookup_path is valid, compare method is money and a == b result = model_evaluation.compare( self.a_money, self.b_money, self.money_field, self.lookup_path) assert result == True
def test_compare_postalcode_when_not_equal(self): # Expecting False when lookup_path is valid, compare method is postalcode and a != b result = model_evaluation.compare( self.a_postalcode, "49238", self.postalcode_field, self.lookup_path) assert result == False