First Commit : test overview

This commit is contained in:
Colin Goutte 2023-08-23 14:49:41 +02:00
commit 9dc2465d5a
5 changed files with 42 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
Pipfile.lock

6
Makefile Normal file
View File

@ -0,0 +1,6 @@
tdd:
git ls-files | entr pipenv run pytest --lf --nf
test:
pipenv run pytest $(opt)

12
Pipfile Normal file
View File

@ -0,0 +1,12 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
pytest = "*"
[requires]
python_version = "3.10"

0
movie_service.py Normal file
View File

23
test_overview.py Normal file
View File

@ -0,0 +1,23 @@
"""
This test show main features required for our api service
"""
import movie_service
def test_create():
movie = movie_service.create(name="Base movie", sample_attr=0)
assert movie_service.movies
def test_update():
initial_value = None
value_to_set = 1
movie = movie_service.create(name="Base movie", sample_attr=initial_value)
base_value = move.sample_attr
movie_service.update(name="Base movie", set_sample_attr=value_to_set)