def test_NameAlreadyTaken_bad_request(self):
     error_view = create_webservice_error_view(NameAlreadyTaken())
     self.assertEqual(CONFLICT, error_view.status)
 def test_DeleteSubscriptionError_bad_request(self):
     error_view = create_webservice_error_view(DeleteSubscriptionError())
     self.assertEqual(BAD_REQUEST, error_view.status)
 def test_CannotTransitionToCountryMirror_bad_request(self):
     error_view = create_webservice_error_view(
         CannotTransitionToCountryMirror())
     self.assertEqual(BAD_REQUEST, error_view.status)
 def test_PPACreationError_bad_request(self):
     error_view = create_webservice_error_view(PPACreationError())
     self.assertEqual(BAD_REQUEST, error_view.status)
 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)
 def test_InclusiveTeamLinkageError_forbidden(self):
     error_view = create_webservice_error_view(InclusiveTeamLinkageError())
     self.assertEqual(FORBIDDEN, error_view.status)
Beispiel #8
0
 def test_PersonLinkageError_forbidden(self):
     error_view = create_webservice_error_view(PrivatePersonLinkageError())
     self.assertEqual(FORBIDDEN, error_view.status)
Beispiel #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)
Beispiel #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)
 def test_ImmutableVisibilityError_forbidden(self):
     error_view = create_webservice_error_view(
         ImmutableVisibilityError())
     self.assertEqual(FORBIDDEN, error_view.status)
Beispiel #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)
Beispiel #18
0
 def test_TeamMembershipTransitionError_bad_request(self):
     error_view = create_webservice_error_view(
         TeamMembershipTransitionError())
     self.assertEqual(BAD_REQUEST, error_view.status)
 def test_SubscriptionPrivacyViolation_bad_request(self):
     error_view = create_webservice_error_view(
         SubscriptionPrivacyViolation())
     self.assertEqual(BAD_REQUEST, error_view.status)
Beispiel #20
0
 def test_DistroSeriesDifferenceError_bad_request(self):
     error_view = create_webservice_error_view(
         DistroSeriesDifferenceError())
     self.assertEqual(BAD_REQUEST, error_view.status)
 def test_PersonLinkageError_forbidden(self):
     error_view = create_webservice_error_view(PrivatePersonLinkageError())
     self.assertEqual(FORBIDDEN, error_view.status)
Beispiel #22
0
 def test_DeleteSubscriptionError_bad_request(self):
     error_view = create_webservice_error_view(DeleteSubscriptionError())
     self.assertEqual(BAD_REQUEST, error_view.status)
 def test_JoinNotAllowed_bad_request(self):
     error_view = create_webservice_error_view(JoinNotAllowed())
     self.assertEqual(BAD_REQUEST, error_view.status)
Beispiel #24
0
 def test_UserCannotSubscribePerson_authorised(self):
     error_view = create_webservice_error_view(UserCannotSubscribePerson())
     self.assertEqual(UNAUTHORIZED, error_view.status)
 def test_DistroSeriesDifferenceError_bad_request(self):
     error_view = create_webservice_error_view(
         DistroSeriesDifferenceError())
     self.assertEqual(BAD_REQUEST, error_view.status)
Beispiel #26
0
 def test_CannotTransitionToCountryMirror_bad_request(self):
     error_view = create_webservice_error_view(
         CannotTransitionToCountryMirror())
     self.assertEqual(BAD_REQUEST, error_view.status)
 def test_UserCannotSubscribePerson_authorised(self):
     error_view = create_webservice_error_view(UserCannotSubscribePerson())
     self.assertEqual(UNAUTHORIZED, error_view.status)
Beispiel #28
0
 def test_UserCannotChangeMembershipSilently_authorised(self):
     error_view = create_webservice_error_view(
         UserCannotChangeMembershipSilently())
     self.assertEqual(UNAUTHORIZED, error_view.status)
 def test_UserCannotChangeMembershipSilently_authorised(self):
     error_view = create_webservice_error_view(
         UserCannotChangeMembershipSilently())
     self.assertEqual(UNAUTHORIZED, error_view.status)
Beispiel #30
0
 def test_NameAlreadyTaken_bad_request(self):
     error_view = create_webservice_error_view(NameAlreadyTaken())
     self.assertEqual(CONFLICT, error_view.status)
 def test_CommercialSubscribersOnly_forbidden(self):
     error_view = create_webservice_error_view(CommercialSubscribersOnly())
     self.assertEqual(FORBIDDEN, error_view.status)
Beispiel #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)
Beispiel #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)
Beispiel #36
0
 def test_LibrarianServerError_timeout(self):
     error_view = create_webservice_error_view(LibrarianServerError())
     self.assertEqual(httplib.REQUEST_TIMEOUT, error_view.status)
Beispiel #37
0
 def test_LibrarianServerError_timeout(self):
     error_view = create_webservice_error_view(LibrarianServerError())
     self.assertEqual(httplib.REQUEST_TIMEOUT, error_view.status)
Beispiel #38
0
 def test_InvalidDuplicateValue_expectation_failed(self):
     error_view = create_webservice_error_view(
         InvalidDuplicateValue("Dup"))
     self.assertEqual(EXPECTATION_FAILED, error_view.status)