moan0s / ILMO2

Intelligent Library Management Online - A simple Web-App for the organization of a library, the users, books, opening hours and lendings.
https://ilmo2.readthedocs.io/en/latest/
GNU General Public License v3.0
7 stars 2 forks source link

Travis fails while local checks don't #3

Closed moan0s closed 3 years ago

moan0s commented 3 years ago

Travis fails with this

$ coverage run --source='.' manage.py test

Creating test database for alias 'default'...

System check identified no issues (0 silenced).

........E.

======================================================================

ERROR: test_str (library.tests.test_models.BookModelTest)

----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/travis/build/moan0s/ILMO2/src/library/tests/test_models.py", line 73, in test_str
    book = Book.objects.get(id=1)
  File "/home/travis/virtualenv/python3.9.1/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/travis/virtualenv/python3.9.1/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
    raise self.model.DoesNotExist(
library.models.Book.DoesNotExist: Book matching query does not exist.

while $ coverage run --source='.' manage.py test runs just fine on my local installation. Maybe a problem with MYSQL or other database related stuff?