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 12, 2022
1 parent e90b2ee commit 64b9309
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
name: Build
command: make build

- run:
name: Tests
command: make unittest

- run:
name: Tests
command: make test
Expand Down
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 64b9309

Please sign in to comment.