Skip to content

Commit

Permalink
Merge pull request #63 from multinet-app/parametrize-api-tests
Browse files Browse the repository at this point in the history
Parametrize API endpoint tests
  • Loading branch information
naglepuff authored Aug 19, 2021
2 parents b548ee1 + 3b0b8fc commit 462af1b
Show file tree
Hide file tree
Showing 8 changed files with 703 additions and 928 deletions.
10 changes: 5 additions & 5 deletions multinet/api/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ class Meta:
model = Network

name = factory.fuzzy.FuzzyText()
workspace = factory.SubFactory(PrivateWorkspaceFactory)
workspace = factory.LazyAttribute(lambda _: PrivateWorkspaceFactory())


class EdgeTableFactory(factory.django.DjangoModelFactory):
class Meta:
model = Table

name = factory.fuzzy.FuzzyText()
workspace = factory.SubFactory(PrivateWorkspaceFactory)
workspace = factory.LazyAttribute(lambda _: PrivateWorkspaceFactory())
edge = True


Expand All @@ -55,7 +55,7 @@ class Meta:
model = Table

name = factory.fuzzy.FuzzyText()
workspace = factory.SubFactory(PrivateWorkspaceFactory)
workspace = factory.LazyAttribute(lambda _: PrivateWorkspaceFactory())


# Default table to node table
Expand All @@ -67,5 +67,5 @@ class UploadFactory(factory.django.DjangoModelFactory):
class Meta:
model = Upload

workspace = factory.SubFactory(PrivateWorkspaceFactory)
user = factory.SubFactory(UserFactory)
workspace = factory.LazyAttribute(lambda _: PrivateWorkspaceFactory())
user = factory.LazyAttribute(lambda _: UserFactory())
Loading

0 comments on commit 462af1b

Please sign in to comment.