Skip to content

Tests failing because of left-over files in tests/testapp/test-media #261

Description

@leducvin

After cloning the repo, tests fail both on main and on v.0.16.0 because of left-over files in the test media storage. Django is renaming them to prevent conflicts with the existing files.

What I did:

  • Cloned the repo, cd-ed into it.
  • Created a venv and ran pip install -e '.[testing]' -U
  • Ran tox (it was not installed by the previous command, I had to install it)

Typical error that I got after 1st tox env ran:

Traceback (most recent call last):
  File "/home/leducvin/dev/wagtailmedia/tests/test_models.py", line 226, in test_filename
    self.assertEqual("example.mp4", self.media.filename)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'example.mp4' != 'example_ZxhVnHw.mp4'

Don't know if I set up the project wrong...

I can submit a PR for this if you'd like.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions