Beispiel #1
0
 def test_release_exists_false(self, mock_find_by_name, mock_send_request):
     """test_release should return False if release does not exist."""
     ap = Actopus('myserver.mycomp.com', 'anapikey')
     mock_find_by_name.return_value = 'Project-161'
     expected = requests.Response()
     expected.status_code = HTTPStatus.NOT_FOUND
     mock_send_request.return_value = expected
     self.assertFalse(ap.release_exists('myproject', 'B100'))
Beispiel #2
0
 def test_release_exists_true(self, mock_find_by_name, mock_send_request):
     """test_release should return True if release exists already."""
     ap = Actopus('myserver.mycomp.com', 'anapikey')
     mock_find_by_name.return_value = 'Project-161'
     expected = requests.Response()
     expected.status_code = HTTPStatus.OK
     mock_send_request.return_value = expected
     self.assertTrue(ap.release_exists('myproject', 'B100'))