Beispiel #1
0
    def test_is_repo_ok(self):
        # valid repo
        if "/Tests" in os.getcwd():
            dna_file_path = "modules/dna.yml"
            install_file_path = "modules/install.yml"
        else:
            dna_file_path = "Tests/modules/dna.yml"
            install_file_path = "Tests/modules/install.yml"
        self.assertTrue(
            ResourcesManager.is_repo_ok(dna_file_path=dna_file_path,
                                        install_file_path=install_file_path))

        # missing dna
        if "/Tests" in os.getcwd():
            dna_file_path = ""
            install_file_path = "modules/install.yml"
        else:
            dna_file_path = "T"
            install_file_path = "Tests/modules/install.yml"
        self.assertFalse(
            ResourcesManager.is_repo_ok(dna_file_path=dna_file_path,
                                        install_file_path=install_file_path))

        # missing install
        if "/Tests" in os.getcwd():
            dna_file_path = "modules/dna.yml"
            install_file_path = ""
        else:
            dna_file_path = "Tests/modules/dna.yml"
            install_file_path = ""
        self.assertFalse(
            ResourcesManager.is_repo_ok(dna_file_path=dna_file_path,
                                        install_file_path=install_file_path))
    def test_is_repo_ok(self):
        # valid repo
        if "/Tests" in os.getcwd():
            dna_file_path = "modules/dna.yml"
            install_file_path = "modules/install.yml"
        else:
            dna_file_path = "Tests/modules/dna.yml"
            install_file_path = "Tests/modules/install.yml"
        self.assertTrue(ResourcesManager.is_repo_ok(dna_file_path=dna_file_path, install_file_path=install_file_path))

        # missing dna
        if "/Tests" in os.getcwd():
            dna_file_path = ""
            install_file_path = "modules/install.yml"
        else:
            dna_file_path = "T"
            install_file_path = "Tests/modules/install.yml"
        self.assertFalse(ResourcesManager.is_repo_ok(dna_file_path=dna_file_path, install_file_path=install_file_path))

        # missing install
        if "/Tests" in os.getcwd():
            dna_file_path = "modules/dna.yml"
            install_file_path = ""
        else:
            dna_file_path = "Tests/modules/dna.yml"
            install_file_path = ""
        self.assertFalse(ResourcesManager.is_repo_ok(dna_file_path=dna_file_path, install_file_path=install_file_path))
Beispiel #3
0
    def test_is_repo_ok(self):
        # valid repo
        dna_file_path = get_test_path("modules/dna.yml")
        install_file_path = get_test_path("modules/install.yml")
        self.assertTrue(ResourcesManager.is_repo_ok(dna_file_path=dna_file_path, install_file_path=install_file_path))

        # missing dna
        dna_file_path = ""
        install_file_path = get_test_path("modules/install.yml")
        self.assertFalse(ResourcesManager.is_repo_ok(dna_file_path=dna_file_path, install_file_path=install_file_path))

        # missing install
        dna_file_path = get_test_path("modules/dna.yml")
        install_file_path = ""
        self.assertFalse(ResourcesManager.is_repo_ok(dna_file_path=dna_file_path, install_file_path=install_file_path))