Example #1
0
 def test_01_success_no_prebuild_script(self):
     s, mock_loc = self.setup_mock_location({})
     self.assertTrue(
         value_validation.PreBuildExistsValidator(
             {
                 CheckKeys.CLONE: False,
                 CheckKeys.CLONE_LOCATION: mock_loc,
                 FieldKeys.GIT_PATH: "/",
                 CheckKeys.STATE: s
             }, DUMMY_INDEX_FILE).validate().success)
Example #2
0
 def test_04_fails_prebuild_script_exists_no_prebuild_context(self):
     s, mock_loc = self.setup_mock_location({"test.sh": "testing 1 2 3"})
     self.assertFalse(
         value_validation.PreBuildExistsValidator(
             {
                 CheckKeys.CLONE: False,
                 CheckKeys.CLONE_LOCATION: mock_loc,
                 FieldKeys.GIT_PATH: "/",
                 FieldKeys.PREBUILD_SCRIPT: "/test.sh",
                 CheckKeys.STATE: s
             }, DUMMY_INDEX_FILE).validate().success)