def test_add_keyword_language_keyword(self):
        """Test add_keyword_language() for single word."""
        input = "Current language"
        expected = 'Current language for keyword "Keyword"'

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

        self.assertEqual(actual, expected)
示例#2
0
    def test_add_keyword_language_keyword(self):
        """Test add_keyword_language() for single word."""
        input = "Current language"
        expected = 'Current language for keyword "Keyword"'

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

        self.assertEqual(actual, expected)
    def test_add_keyword_language_key_empty(self):
        """Test add_keyword_language() for empty search."""
        input = "Current language"
        expected = 'Current language'

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

        actual = rl.add_keyword_language(input)

        self.assertEqual(actual, expected)
    def test_add_keyword_language_key_phrase(self):
        """Test add_keyword_language() for multiple words."""
        input = "Current language"
        expected = 'Current language for key phrase "Key phrase"'

        new_data = copy.deepcopy(standard_data)
        new_data["name_address"] = "Key phrase"
        rl = ResultsLanguage(new_data)

        actual = rl.add_keyword_language(input)

        self.assertEqual(actual, expected)
示例#5
0
    def test_add_keyword_language_key_empty(self):
        """Test add_keyword_language() for empty search."""
        input = "Current language"
        expected = 'Current language'

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

        actual = rl.add_keyword_language(input)

        self.assertEqual(actual, expected)
示例#6
0
    def test_add_keyword_language_key_phrase(self):
        """Test add_keyword_language() for multiple words."""
        input = "Current language"
        expected = 'Current language for key phrase "Key phrase"'

        new_data = copy.deepcopy(standard_data)
        new_data["name_address"] = "Key phrase"
        rl = ResultsLanguage(new_data)

        actual = rl.add_keyword_language(input)

        self.assertEqual(actual, expected)