@pytest.fixture
def po_directory(request, po_test_dir, settings):
 from pootle_store.models import fs
 translation_directory = settings.POOTLE_TRANSLATION_DIRECTORY
 settings.POOTLE_TRANSLATION_DIRECTORY = po_test_dir
 fs.location = po_test_dir
 def _cleanup():
  settings.POOTLE_TRANSLATION_DIRECTORY = translation_directory
 request.addfinalizer(_cleanup)

@ pytest . fixture def po_directory ( request , po_test_dir , settings ) : from pootle_store . models import fs translation_directory = settings . POOTLE_TRANSLATION_DIRECTORY settings . POOTLE_TRANSLATION_DIRECTORY = po_test_dir fs . location = po_test_dir def _cleanup ( ) : settings . POOTLE_TRANSLATION_DIRECTORY = translation_directory request . addfinalizer ( _cleanup )
sets up a tmp directory for po files .