Skip to content

Commit

Permalink
Merge pull request ckan#7633 from ckan/register-factories-as-fixtures
Browse files Browse the repository at this point in the history
Automatically register all factories as fixtures
  • Loading branch information
wardi authored Jun 25, 2024
2 parents f0df37b + 97c34ad commit be6d897
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/7631.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`user_with_token` / `sysadmin_with_token` factory fixtures added to test suite.
10 changes: 10 additions & 0 deletions ckan/tests/pytest_ckan/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,21 @@ class SysadminFactory(factories.Sysadmin):
pass


class SysadminWithTokenFactory(factories.SysadminWithToken):
pass


class UserWithTokenFactory(factories.UserWithToken):
pass


class OrganizationFactory(factories.Organization):
pass


register(SysadminFactory, "sysadmin")
register(SysadminWithTokenFactory, "sysadmin_with_token")
register(UserWithTokenFactory, "user_with_token")
register(OrganizationFactory, "organization")


Expand Down

0 comments on commit be6d897

Please sign in to comment.