Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No schema for ItemCreate #27

Open
lukasz-madon opened this issue Jun 6, 2023 · 1 comment
Open

No schema for ItemCreate #27

lukasz-madon opened this issue Jun 6, 2023 · 1 comment
Labels
help wanted Extra attention is needed tests Issue applies to tests

Comments

@lukasz-madon
Copy link

There is an import in tests but no definition in code.

git:(main) ✗ docker-compose exec backend bash
root@eedc12fd4540:/app# ls
alembic  alembic.ini  app  imports  inboard  mypy.ini  poetry.lock  poetry.toml  prestart.sh  pyproject.toml  scripts  tests-start.sh  worker-start.sh
root@eedc12fd4540:/app# py.test
=========================================================================================== test session starts ============================================================================================
platform linux -- Python 3.9.15, pytest-7.2.1, pluggy-1.0.0
rootdir: /app
plugins: anyio-3.6.2, cov-4.0.0
collected 19 items / 2 errors

================================================================================================== ERRORS ==================================================================================================
___________________________________________________________________________ ERROR collecting app/tests/api/api_v1/test_items.py ____________________________________________________________________________
ImportError while importing test module '/app/app/tests/api/api_v1/test_items.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
app/tests/api/api_v1/test_items.py:5: in <module>
    from app.tests.utils.item import create_random_item
app/tests/utils/item.py:6: in <module>
    from app.schemas.item import ItemCreate
E   ModuleNotFoundError: No module named 'app.schemas.item'
_______________________________________________________________________________ ERROR collecting app/tests/crud/test_item.py _______________________________________________________________________________
ImportError while importing test module '/app/app/tests/crud/test_item.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
app/tests/crud/test_item.py:4: in <module>
    from app.schemas.item import ItemCreate, ItemUpdate
E   ModuleNotFoundError: No module named 'app.schemas.item'
============================================================================================= warnings summary =============================================================================================
.venv/lib/python3.9/site-packages/pkg_resources/__init__.py:121
  /app/.venv/lib/python3.9/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================================= short test summary info ==========================================================================================
ERROR app/tests/api/api_v1/test_items.py
ERROR app/tests/crud/test_item.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================================= 1 warning, 2 errors in 1.93s =======================================================================================
root@eedc12fd4540:/app#
@turukawa
Copy link
Member

turukawa commented Jun 9, 2023

Hey @lukasz-madon I haven't updated all the tests and was kinda hoping someone else might like to take on that responsibility :|

If you're keen, I'm happy to review a tests pull request and integrate it into the project.

@turukawa turukawa added help wanted Extra attention is needed tests Issue applies to tests labels Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed tests Issue applies to tests
Projects
None yet
Development

No branches or pull requests

2 participants