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