Exemple #1
0
    def test_parse_cmd_list_1(self, ParseInEnds):
        ParseInEnds.return_value = ("phage.PhageID LIKE Trixie OR "
                                    "gene.Notes LIKE Antirepressor")

        unparsed_string_list = ["Example", "unparsed", "string", "list"]
        parsing.parse_cmd_list(unparsed_string_list)

        ParseInEnds.assert_called_with(unparsed_string_list)
Exemple #2
0
    def test_parse_cmd_list_1(self, parse_in_spaces_mock):
        """Verify parse_in_spaces() is called with correct parameters.
        """
        parse_in_spaces_mock.return_value = ("phage.PhageID LIKE Trixie OR "
                                             "gene.Notes LIKE Antirepressor")

        unparsed_string_list = ["Example", "unparsed", "string", "list"]
        parsing.parse_cmd_list(unparsed_string_list)

        parse_in_spaces_mock.assert_called_with(unparsed_string_list)
Exemple #3
0
    def test_parse_cmd_list_2(self, ParseCmdString):
        expected_parsed_string = ("phage.PhageID LIKE Trixie OR "
                                  "gene.Notes LIKE Antirepressor")

        unparsed_string_list = [
            "phage.PhageID", "LIKE", "Trixie", "OR", "gene.Notes", "LIKE",
            "Antirepressor"
        ]

        parsing.parse_cmd_list(unparsed_string_list)

        ParseCmdString.assert_called_with(expected_parsed_string)
Exemple #4
0
    def test_parse_cmd_list_2(self, parse_cmd_string_mock):
        """Verify parse_cmd_string() is called with correct parameters.
        """
        expected_parsed_string = ("phage.PhageID LIKE Trixie OR "
                                  "gene.Notes LIKE Antirepressor")

        unparsed_string_list = ["phage.PhageID", "LIKE", "Trixie", "OR",
                                "gene.Notes", "LIKE", "Antirepressor"]

        parsing.parse_cmd_list(unparsed_string_list)

        parse_cmd_string_mock.assert_called_with(expected_parsed_string)