rdmorganiser / rdmo

A tool to support the planning, implementation, and organization of research data management.
https://rdmorganiser.github.io
Apache License 2.0
105 stars 49 forks source link

tests(projects): add files fixture to tests that use MEDIA_ROOT #1105

Closed MyPyDavid closed 3 months ago

MyPyDavid commented 3 months ago

Description

Adds the files fixture as arg to certain tests that use settings.MEDIA_ROOT, hope that prevents them from failing.

Related issue: #1086

Motivation and Context

How has this been tested?

Screenshots (if appropriate)

Types of Changes

Checklist

jochenklar commented 3 months ago

Can you give a link how files works?

MyPyDavid commented 3 months ago

this one: https://github.com/rdmorganiser/rdmo/blob/065d195043b7ac34a7b6b3180dac69829a3974bc/conftest.py#L45 it is already used by some test functions..

thought to copy the files once at start of the session, but then you get problems with clean up after the tests. So this fixture makes a new tempfolder per test function, we could add a rmdir to this fixture for clean up.