def test_add_amount_language_both(self):
        """Test add_amount_language() with both."""
        input = "Current sentence"
        expected = "Current sentence where the price was between " + \
            "$10 and $1,000"

        rl = ResultsLanguage(standard_data)
        actual = rl.add_amount_language(input)

        self.assertEqual(actual, expected)
Exemple #2
0
    def test_add_amount_language_both(self):
        """Test add_amount_language() with both."""
        input = "Current sentence"
        expected = "Current sentence where the price was between " + \
            "$10 and $1,000"

        rl = ResultsLanguage(standard_data)
        actual = rl.add_amount_language(input)

        self.assertEqual(actual, expected)
    def test_add_amount_language_high_only(self):
        """Test add_amount_language() with high amount only."""
        input = "Current sentence"
        expected = "Current sentence where the price was less than $1,000"

        new_data = copy.deepcopy(standard_data)
        new_data["amount_low"] = ""
        rl = ResultsLanguage(new_data)

        actual = rl.add_amount_language(input)

        self.assertEqual(actual, expected)
Exemple #4
0
    def test_add_amount_language_high_only(self):
        """Test add_amount_language() with high amount only."""
        input = "Current sentence"
        expected = "Current sentence where the price was less than $1,000"

        new_data = copy.deepcopy(standard_data)
        new_data["amount_low"] = ""
        rl = ResultsLanguage(new_data)

        actual = rl.add_amount_language(input)

        self.assertEqual(actual, expected)
    def test_add_amount_language_none(self):
        """Test add_amount_language() without anything new."""
        input = "Current sentence"
        expected = "Current sentence"

        new_data = copy.deepcopy(standard_data)
        new_data["amount_low"] = ""
        new_data["amount_high"] = ""
        rl = ResultsLanguage(new_data)

        actual = rl.add_amount_language(input)

        self.assertEqual(actual, expected)
Exemple #6
0
    def test_add_amount_language_none(self):
        """Test add_amount_language() without anything new."""
        input = "Current sentence"
        expected = "Current sentence"

        new_data = copy.deepcopy(standard_data)
        new_data["amount_low"] = ""
        new_data["amount_high"] = ""
        rl = ResultsLanguage(new_data)

        actual = rl.add_amount_language(input)

        self.assertEqual(actual, expected)