Exemplo n.º 1
0
 def test_get_form_class_returns_DeviceForm_for_update(self):
     user = factory.make_User()
     handler = DeviceHandler(user, {})
     self.assertIs(DeviceForm, handler.get_form_class("update"))
Exemplo n.º 2
0
 def test_get_form_class_returns_DeviceWithMACsForm_for_create(self):
     user = factory.make_User()
     handler = DeviceHandler(user, {}, None)
     self.assertIs(DeviceWithMACsForm, handler.get_form_class("create"))