def test_Signature_creator_success(self): s = Signature(name='unittest') s.set_content('TEST_CONTENT', contenttype='text/plain') d = s.to_creator() self.assertTrue(d['content'], 'TEST_CONTENT')
def test_modify_signature_without_id_attribute_error(self): sig1 = Signature(name='foo') sig1.set_content('NEW-CONTENT', "text/plain") with self.assertRaises(AttributeError): self.zc.modify_signature(sig1)
def test_Signature_creator_default_format(self): s = Signature(name='unittest') s.set_content('TEST_CONTENT') self.assertEqual(s._contenttype, 'text/html')
def test_Signature_set_content(self): s = Signature(name='unittest') s.set_content('TEST_CONTENT', contenttype='text/plain') self.assertEqual(s._contenttype, 'text/plain') self.assertEqual(s._content, 'TEST_CONTENT')
def test_Signature_creator_success(self): s = Signature(name="unittest") s.set_content("TEST_CONTENT", contenttype="text/plain") d = s.to_creator() self.assertTrue(d["content"], "TEST_CONTENT")
def test_modify_signature_without_id_attribute_error(self): sig1 = Signature(name='foo') sig1.set_content('NEW-CONTENT', "text/plain") with self.assertRaises(AttributeError): self.zc.modify_signature(sig1)
def test_Signature_set_content(self): s = Signature(name="unittest") s.set_content("TEST_CONTENT", contenttype="text/plain") self.assertEqual(s._contenttype, "text/plain") self.assertEqual(s._content, "TEST_CONTENT")
def test_Signature_creator_default_format(self): s = Signature(name="unittest") s.set_content("TEST_CONTENT") self.assertEqual(s._contenttype, "text/html")
def test_Signature_creator_success(self): s = Signature(name='unittest') s.set_content('TEST_CONTENT', contenttype='text/plain') d = s.to_creator() self.assertTrue(d['content'], 'TEST_CONTENT')
def test_Signature_set_content(self): s = Signature(name='unittest') s.set_content('TEST_CONTENT', contenttype='text/plain') self.assertEqual(s._contenttype, 'text/plain') self.assertEqual(s._content, 'TEST_CONTENT')
def test_Signature_creator_default_format(self): s = Signature(name='unittest') s.set_content('TEST_CONTENT') self.assertEqual(s._contenttype, 'text/html')