Esempio n. 1
0
    def test_given_invalid_source_then_clone_not_called(
            self, mock_clone_from, _2, _3):
        source = "/does/not/exist"

        server = GitServer("*****@*****.**", "*****@*****.**",
                           "*****@*****.**")

        server.clone_multi(source)

        self.assertFalse(mock_clone_from.call_count)
Esempio n. 2
0
    def test_given_ioc_area_name_then_clone_with_domain_in_file_name(
            self, mock_clone_from, _1, _2, _3):
        source = "controls/ioc/"

        server = GitServer("*****@*****.**", "*****@*****.**",
                           "*****@*****.**")

        server.clone_multi(source)

        mock_clone_from.assert_called_once_with(
            "[email protected]/controls/ioc/BL/module", "./BL/module")
Esempio n. 3
0
    def test_given_valid_module_name_then_clone(self, mock_clone_from, _1, _2,
                                                _3):
        source = "controls/area/"

        server = GitServer("*****@*****.**", "*****@*****.**",
                           "*****@*****.**")

        server.clone_multi(source)

        mock_clone_from.assert_called_once_with(
            "[email protected]/controls/area/test_module", "./test_module")
Esempio n. 4
0
    def test_given_one_existing_module_one_not_then_clone_one(
            self, mock_clone_from, _1, _2, _3, _4):
        source = "controls/area"

        server = GitServer("*****@*****.**", "*****@*****.**",
                           "*****@*****.**")

        server.clone_multi(source)

        mock_clone_from.assert_called_once_with(
            "[email protected]/controls/ioc/domain/test_module",
            "./test_module2")