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

Setup unit tests. #73

Merged
merged 3 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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