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
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' '}')
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' '}')
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
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