Ejemplo n.º 1
0
 def test_NameAlreadyTaken_bad_request(self):
     error_view = create_webservice_error_view(NameAlreadyTaken())
     self.assertEqual(CONFLICT, error_view.status)
Ejemplo n.º 2
0
 def test_DeleteSubscriptionError_bad_request(self):
     error_view = create_webservice_error_view(DeleteSubscriptionError())
     self.assertEqual(BAD_REQUEST, error_view.status)
Ejemplo n.º 3
0
 def test_CannotTransitionToCountryMirror_bad_request(self):
     error_view = create_webservice_error_view(
         CannotTransitionToCountryMirror())
     self.assertEqual(BAD_REQUEST, error_view.status)
Ejemplo n.º 4
0
 def test_PPACreationError_bad_request(self):
     error_view = create_webservice_error_view(PPACreationError())
     self.assertEqual(BAD_REQUEST, error_view.status)
Ejemplo n.º 5
0
 def test_TeamMembershipTransitionError_bad_request(self):
     error_view = create_webservice_error_view(
         TeamMembershipTransitionError())
     self.assertEqual(BAD_REQUEST, error_view.status)
 def test_QuestionTargetError(self):
     error_view = create_webservice_error_view(QuestionTargetError())
     self.assertEqual(400, error_view.status)
Ejemplo n.º 7
0
 def test_InclusiveTeamLinkageError_forbidden(self):
     error_view = create_webservice_error_view(InclusiveTeamLinkageError())
     self.assertEqual(FORBIDDEN, error_view.status)
Ejemplo n.º 8
0
 def test_PersonLinkageError_forbidden(self):
     error_view = create_webservice_error_view(PrivatePersonLinkageError())
     self.assertEqual(FORBIDDEN, error_view.status)
Ejemplo n.º 9
0
 def test_PPACreationError_bad_request(self):
     error_view = create_webservice_error_view(PPACreationError())
     self.assertEqual(BAD_REQUEST, error_view.status)
 def test_QuestionTargetError(self):
     error_view = create_webservice_error_view(QuestionTargetError())
     self.assertEqual(400, error_view.status)
Ejemplo n.º 11
0
 def test_InclusiveTeamLinkageError_forbidden(self):
     error_view = create_webservice_error_view(InclusiveTeamLinkageError())
     self.assertEqual(FORBIDDEN, error_view.status)
 def test_NotQuestionOwnerError(self):
     error_view = create_webservice_error_view(NotQuestionOwnerError())
     self.assertEqual(400, error_view.status)
 def test_NotAnswerContactError(self):
     error_view = create_webservice_error_view(NotAnswerContactError())
     self.assertEqual(400, error_view.status)
 def test_InvalidQuestionStateError(self):
     error_view = create_webservice_error_view(InvalidQuestionStateError())
     self.assertEqual(400, error_view.status)
Ejemplo n.º 15
0
 def test_ImmutableVisibilityError_forbidden(self):
     error_view = create_webservice_error_view(
         ImmutableVisibilityError())
     self.assertEqual(FORBIDDEN, error_view.status)
Ejemplo n.º 16
0
 def test_JoinNotAllowed_bad_request(self):
     error_view = create_webservice_error_view(JoinNotAllowed())
     self.assertEqual(BAD_REQUEST, error_view.status)
 def test_NotAnswerContactError(self):
     error_view = create_webservice_error_view(NotAnswerContactError())
     self.assertEqual(400, error_view.status)
Ejemplo n.º 18
0
 def test_TeamMembershipTransitionError_bad_request(self):
     error_view = create_webservice_error_view(
         TeamMembershipTransitionError())
     self.assertEqual(BAD_REQUEST, error_view.status)
Ejemplo n.º 19
0
 def test_SubscriptionPrivacyViolation_bad_request(self):
     error_view = create_webservice_error_view(
         SubscriptionPrivacyViolation())
     self.assertEqual(BAD_REQUEST, error_view.status)
Ejemplo n.º 20
0
 def test_DistroSeriesDifferenceError_bad_request(self):
     error_view = create_webservice_error_view(
         DistroSeriesDifferenceError())
     self.assertEqual(BAD_REQUEST, error_view.status)
Ejemplo n.º 21
0
 def test_PersonLinkageError_forbidden(self):
     error_view = create_webservice_error_view(PrivatePersonLinkageError())
     self.assertEqual(FORBIDDEN, error_view.status)
Ejemplo n.º 22
0
 def test_DeleteSubscriptionError_bad_request(self):
     error_view = create_webservice_error_view(DeleteSubscriptionError())
     self.assertEqual(BAD_REQUEST, error_view.status)
Ejemplo n.º 23
0
 def test_JoinNotAllowed_bad_request(self):
     error_view = create_webservice_error_view(JoinNotAllowed())
     self.assertEqual(BAD_REQUEST, error_view.status)
Ejemplo n.º 24
0
 def test_UserCannotSubscribePerson_authorised(self):
     error_view = create_webservice_error_view(UserCannotSubscribePerson())
     self.assertEqual(UNAUTHORIZED, error_view.status)
Ejemplo n.º 25
0
 def test_DistroSeriesDifferenceError_bad_request(self):
     error_view = create_webservice_error_view(
         DistroSeriesDifferenceError())
     self.assertEqual(BAD_REQUEST, error_view.status)
Ejemplo n.º 26
0
 def test_CannotTransitionToCountryMirror_bad_request(self):
     error_view = create_webservice_error_view(
         CannotTransitionToCountryMirror())
     self.assertEqual(BAD_REQUEST, error_view.status)
Ejemplo n.º 27
0
 def test_UserCannotSubscribePerson_authorised(self):
     error_view = create_webservice_error_view(UserCannotSubscribePerson())
     self.assertEqual(UNAUTHORIZED, error_view.status)
Ejemplo n.º 28
0
 def test_UserCannotChangeMembershipSilently_authorised(self):
     error_view = create_webservice_error_view(
         UserCannotChangeMembershipSilently())
     self.assertEqual(UNAUTHORIZED, error_view.status)
Ejemplo n.º 29
0
 def test_UserCannotChangeMembershipSilently_authorised(self):
     error_view = create_webservice_error_view(
         UserCannotChangeMembershipSilently())
     self.assertEqual(UNAUTHORIZED, error_view.status)
Ejemplo n.º 30
0
 def test_NameAlreadyTaken_bad_request(self):
     error_view = create_webservice_error_view(NameAlreadyTaken())
     self.assertEqual(CONFLICT, error_view.status)
Ejemplo n.º 31
0
 def test_CommercialSubscribersOnly_forbidden(self):
     error_view = create_webservice_error_view(CommercialSubscribersOnly())
     self.assertEqual(FORBIDDEN, error_view.status)
Ejemplo n.º 32
0
 def test_CommercialSubscribersOnly_forbidden(self):
     error_view = create_webservice_error_view(CommercialSubscribersOnly())
     self.assertEqual(FORBIDDEN, error_view.status)
 def test_InvalidQuestionStateError(self):
     error_view = create_webservice_error_view(InvalidQuestionStateError())
     self.assertEqual(400, error_view.status)
Ejemplo n.º 34
0
 def test_ImmutableVisibilityError_forbidden(self):
     error_view = create_webservice_error_view(ImmutableVisibilityError())
     self.assertEqual(FORBIDDEN, error_view.status)
 def test_NotQuestionOwnerError(self):
     error_view = create_webservice_error_view(NotQuestionOwnerError())
     self.assertEqual(400, error_view.status)
Ejemplo n.º 36
0
 def test_LibrarianServerError_timeout(self):
     error_view = create_webservice_error_view(LibrarianServerError())
     self.assertEqual(httplib.REQUEST_TIMEOUT, error_view.status)
Ejemplo n.º 37
0
 def test_LibrarianServerError_timeout(self):
     error_view = create_webservice_error_view(LibrarianServerError())
     self.assertEqual(httplib.REQUEST_TIMEOUT, error_view.status)
Ejemplo n.º 38
0
 def test_InvalidDuplicateValue_expectation_failed(self):
     error_view = create_webservice_error_view(
         InvalidDuplicateValue("Dup"))
     self.assertEqual(EXPECTATION_FAILED, error_view.status)