Ejemplo n.º 1
0
    def test_plural_or_not(self):
        """Test convert_amount()."""
        expected = "sales"

        rl = ResultsLanguage(standard_data)
        actual = rl.plural_or_not()

        self.assertEqual(actual, expected)
Ejemplo n.º 2
0
    def test_plural_or_not(self):
        """Test convert_amount()."""
        expected = "sales"

        rl = ResultsLanguage(standard_data)
        actual = rl.plural_or_not()

        self.assertEqual(actual, expected)
Ejemplo n.º 3
0
    def test_plural_or_not_single(self):
        """Test convert_amount() for a single sale."""
        expected = "sale"

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

        actual = rl.plural_or_not()

        self.assertEqual(actual, expected)
Ejemplo n.º 4
0
    def test_plural_or_not_single(self):
        """Test convert_amount() for a single sale."""
        expected = "sale"

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

        actual = rl.plural_or_not()

        self.assertEqual(actual, expected)