예제 #1
0
    def test_factory_registration(self):

        factory.register(TestMail)
        self.assertIn('test', factory.mail_map)

        factory.unregister(TestMail)
        self.assertNotIn('test', factory.mail_map)
예제 #2
0
 def tearDown(self):
     factory.unregister(TestMail)
예제 #3
0
 def test_factory_unregister(self):
     with self.assertRaises(MailFactoryError):
         factory.unregister(TestMail)