First Commit : test overview
This commit is contained in:
commit
9dc2465d5a
|
@ -0,0 +1 @@
|
|||
Pipfile.lock
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
tdd:
|
||||
git ls-files | entr pipenv run pytest --lf --nf
|
||||
|
||||
test:
|
||||
pipenv run pytest $(opt)
|
|
@ -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,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)
|
Loading…
Reference in New Issue