Private
Public Access
1
0

at the point where the test is there and fails

No changes to the code yet, so we expected it to fail
This commit is contained in:
Sander Roosendaal
2019-01-24 16:28:53 +01:00
parent 5e39a1ec67
commit 0f3f9c1b2b
7 changed files with 253 additions and 166 deletions

View File

@@ -150,3 +150,20 @@ class SessionFactory(factory.DjangoModelFactory):
name = factory.LazyAttribute(lambda _: faker.word())
comment = faker.text()
@pytest.fixture(scope="session", autouse=True)
def cleanup(request):
def remove_test_files():
for filename in os.listdir('media/mailbox_attachments'):
path = os.path.join('media/mailbox_attachments/',filename)
if not os.path.isdir(path):
os.remove(path)
for filename in os.listdir('rowers/tests/testdata/temp'):
path = os.path.join('rowers/tests/testdata/temp/',filename)
if not os.path.isdir(path):
os.remove(path)
request.addfinalizer(remove_test_files)