Ejemplo n.º 1
0
 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')
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 def test_Signature_creator_default_format(self):
     s = Signature(name='unittest')
     s.set_content('TEST_CONTENT')
     self.assertEqual(s._contenttype, 'text/html')
Ejemplo n.º 4
0
    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')
Ejemplo n.º 5
0
 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")
Ejemplo n.º 6
0
 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)
Ejemplo n.º 7
0
    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")
Ejemplo n.º 8
0
 def test_Signature_creator_default_format(self):
     s = Signature(name="unittest")
     s.set_content("TEST_CONTENT")
     self.assertEqual(s._contenttype, "text/html")
Ejemplo n.º 9
0
 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')
Ejemplo n.º 10
0
    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')
Ejemplo n.º 11
0
 def test_Signature_creator_default_format(self):
     s = Signature(name='unittest')
     s.set_content('TEST_CONTENT')
     self.assertEqual(s._contenttype, 'text/html')