예제 #1
0
 def test_submitted_data(self):
     dsa = DocumentSpamAttempt(data=None)
     assert self.admin.submitted_data(dsa) == SUBMISSION_NOT_AVAILABLE
     data = '{"foo": "bar"}'
     dsa.data = data
     expected = '\n'.join(('<dl>', '  <dt>foo</dt><dd>bar</dd>', '</dl>'))
     assert self.admin.submitted_data(dsa) == expected
예제 #2
0
 def test_submitted_data(self):
     dsa = DocumentSpamAttempt(data=None)
     expected = self.admin.SUBMISSION_NOT_AVAILABLE
     assert self.admin.submitted_data(dsa) == expected
     dsa.data = '{"foo": "bar"}'
     assert self.admin.submitted_data(dsa) == ('{\n'
                                               '    "foo": "bar"\n'
                                               '}')
예제 #3
0
 def test_submitted_data(self):
     dsa = DocumentSpamAttempt(data=None)
     expected = self.admin.SUBMISSION_NOT_AVAILABLE
     assert self.admin.submitted_data(dsa) == expected
     dsa.data = '{"foo": "bar"}'
     assert self.admin.submitted_data(dsa) == (
         '{\n'
         '    "foo": "bar"\n'
         '}')
예제 #4
0
 def test_submitted_data(self):
     dsa = DocumentSpamAttempt(data=None)
     assert self.admin.submitted_data(dsa) == SUBMISSION_NOT_AVAILABLE
     data = '{"foo": "bar"}'
     dsa.data = data
     expected = '\n'.join((
         '<dl>',
         '  <dt>foo</dt><dd>bar</dd>',
         '</dl>'))
     assert self.admin.submitted_data(dsa) == expected
예제 #5
0
 def test_submitted_data(self):
     dsa = DocumentSpamAttempt(data=None)
     assert self.admin.submitted_data(dsa) == SUBMISSION_NOT_AVAILABLE
     data = '{"foo": "bar"}'
     dsa.data = data
     assert self.admin.submitted_data(dsa) == data
예제 #6
0
 def test_submitted_data(self):
     dsa = DocumentSpamAttempt(data=None)
     assert self.admin.submitted_data(dsa) == SUBMISSION_NOT_AVAILABLE
     data = '{"foo": "bar"}'
     dsa.data = data
     assert self.admin.submitted_data(dsa) == data