Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Setup unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiPidlisnyi committed Jul 13, 2022
1 parent e90b2ee commit fcb203e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ build:

test:
cd integration_tests && docker-compose down && docker-compose run --rm tests

unittest:
pytest tests/
Empty file added tests/__init__.py
Empty file.
14 changes: 14 additions & 0 deletions tests/test_extend.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from graphene import Int, String

from graphene_federation.extend import external, requires


def test_external():
field = external(Int(required=True))
assert field._external is True


def test_requires():
fields = 'primaryEmail'
field = requires(String(), fields=fields)
assert field._requires == fields

0 comments on commit fcb203e

Please sign in to comment.