admin: fix get_form_class

This commit is contained in:
Jens Langhammer 2020-09-29 11:42:34 +02:00
parent 9724ded194
commit 760352202e
3 changed files with 3 additions and 2 deletions

View File

@ -167,6 +167,7 @@ class TestProviderSAML(SeleniumTestCase):
self.driver.find_element(By.ID, "id_uid_field").send_keys(Keys.ENTER) self.driver.find_element(By.ID, "id_uid_field").send_keys(Keys.ENTER)
self.driver.find_element(By.ID, "id_password").send_keys(USER().username) self.driver.find_element(By.ID, "id_password").send_keys(USER().username)
self.driver.find_element(By.ID, "id_password").send_keys(Keys.ENTER) self.driver.find_element(By.ID, "id_password").send_keys(Keys.ENTER)
sleep(1)
self.wait_for_url("http://localhost:9009/") self.wait_for_url("http://localhost:9009/")
self.assertEqual( self.assertEqual(
self.driver.find_element(By.CSS_SELECTOR, "pre").text, self.driver.find_element(By.CSS_SELECTOR, "pre").text,

View File

@ -43,7 +43,7 @@ class InheritanceCreateView(CreateAssignPermView):
) )
except StopIteration as exc: except StopIteration as exc:
raise Http404 from exc raise Http404 from exc
return model.form(model) return model().form
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: def get_context_data(self, **kwargs: Any) -> Dict[str, Any]:
kwargs = super().get_context_data(**kwargs) kwargs = super().get_context_data(**kwargs)

View File

@ -163,7 +163,7 @@ class SAMLPropertyMapping(PropertyMapping):
def __str__(self): def __str__(self):
name = self.friendly_name if self.friendly_name != "" else self.saml_name name = self.friendly_name if self.friendly_name != "" else self.saml_name
return f"SAML Property Mapping {self.name} ({name})" return f"{self.name} ({name})"
class Meta: class Meta: