Esempio n. 1
0
 def test_doc(self):
     # The doc() method returns the message.  It is called when rendering
     # an error in the UI. eg structure error.
     error = TeamMembershipPolicyError('a message')
     self.assertEqual('a message', error.doc())
Esempio n. 2
0
 def test_str(self):
     # The string is the error message.
     error = TeamMembershipPolicyError('a message')
     self.assertEqual('a message', str(error))
Esempio n. 3
0
 def test_doc(self):
     # The doc() method returns the message.  It is called when rendering
     # an error in the UI. eg structure error.
     error = TeamMembershipPolicyError('a message')
     self.assertEqual('a message', error.doc())
Esempio n. 4
0
 def test_default_message(self):
     error = TeamMembershipPolicyError()
     self.assertEqual('Team Membership Policy Error', error.message)
Esempio n. 5
0
 def test_TeamMembershipPolicyError_bad_request(self):
     error_view = create_webservice_error_view(TeamMembershipPolicyError())
     self.assertEqual(BAD_REQUEST, error_view.status)