コード例 #1
0
 def test_failed_request_submission(self):
     path = os.path.join(DATA_PATH, 'failed_request_missing_field.html')
     content = open(path).read()
     submit = parsers.request_submission(content)
     self.assertTrue(submit['error'])
     self.assertEqual(submit['message'],
                      'Photo Journal Year is a required field.')
コード例 #2
0
 def test_completed_request_submission(self):
     path = os.path.join(DATA_PATH, 'completed_request.html')
     content = open(path).read()
     submit = parsers.request_submission(content)
     self.assertFalse(submit['error'])
     self.assertEqual(
         submit['transaction_number'],
         '476993'
     )
     self.assertTrue(submit['submitted'])