Example #1
0
    def test_load_project_bad(self, runner_initialize, *args):
        runner_initialize.side_effect = FileNotFoundError()

        response = Response()
        self.assertFalse(opener.load_project(response, INVALID_PATH))
        self.assertTrue(response.errors[0].code == 'PROJECT_NOT_FOUND')
Example #2
0
 def test_load_project_bad_2(self, runner_initialize, *args):
     runner_initialize.side_effect = ValueError()
     response = Response()
     self.assertFalse(opener.load_project(response, INVALID_PATH))
     self.assertTrue(response.errors[0].code == 'PROJECT_INIT_FAILURE')
Example #3
0
 def test_not_exists_load(self, *args):
     """ should return False when the project does not exist """
     self.assertFalse(opener.load_project(Response(), INVALID_PATH))