@pytest.fixture
def project_dir_resources0(project0, subdir0):
 from pootle_app.models import Directory
 from pootle_project.models import ProjectResource
 resources = Directory.objects.live().filter(name=subdir0.name, parent__translationproject__project=project0)
 return ProjectResource(resources, ('/projects/%s/%s' % (project0.code, subdir0.name)))

@ pytest . fixture def project_dir_resources0 ( project0 , subdir0 ) : from pootle_app . models import Directory from pootle_project . models import ProjectResource resources = Directory . objects . live ( ) . filter ( name = subdir0 . name , parent__translationproject__project = project0 ) return ProjectResource ( resources , ( '/projects/%s/%s' % ( project0 . code , subdir0 . name ) ) )
returns a projectresource object for a directory .