def test_get_initial_returns_is_editor_status_and_nothing_else(self): custom_org_user_update_view = CustomOrganizationUserUpdate() # This will provide an organization and user, but no permissions will # be assigned so is_editor will be False custom_org_user_update_view.object = OrganizationUserFactory.build() expected_initial = {'is_editor': False} self.assertDictEqual(custom_org_user_update_view.get_initial(), expected_initial)
def test_get_initial_returns_is_editor_status_and_nothing_else(self): custom_org_user_update_view = CustomOrganizationUserUpdate() # This will provide an organization and user, but no permissions will # be assigned so is_editor will be False custom_org_user_update_view.object = OrganizationUserFactory.build() expected_initial = {'is_editor': False} self.assertDictEqual(custom_org_user_update_view.get_initial(), expected_initial)
def test_form_class_is_CustomOrganizationUserForm(self): custom_org_user_update_view = CustomOrganizationUserUpdate() self.assertEqual(custom_org_user_update_view.get_form_class(), CustomOrganizationUserForm)
def test_form_class_is_CustomOrganizationUserForm(self): custom_org_user_update_view = CustomOrganizationUserUpdate() self.assertIs( custom_org_user_update_view.get_form_class(), CustomOrganizationUserForm)