RSSAmplifier

Blogs on FlowFX · Jul 13, 2017

Use Django in-memory file storage with pytest

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

In my current project, I create PDF files from Jinja2/LaTeX templates. In each test run, several PDFs are created and saved to disk. How do you test this without filling up the hard drive? I use an in-memory data storage. For Django there is a package that makes it really easy: dj-inmemorystorage . A non-persistent in-memory data storage backend for Django. Using pytest fixtures : #…

Read on flowfx.de

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.