Пример #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)