@pytest.mark.cmd
@pytest.mark.django_db
def test_export_path(capfd, export_dir, cd_export_dir):
 call_command('export', '--path=/language0')
 (out, err) = capfd.readouterr()
 assert ('language0.zip' in out)
 assert ('language1.zip' not in out)
 call_command('export', '--path=/language0/project0')
 (out, err) = capfd.readouterr()
 assert ('language0-project0.zip' in out)
 call_command('export', '--path=/language0/project0/store0.po')
 (out, err) = capfd.readouterr()
 assert ('store0.po' in out)
 call_command('export', '--path=/')
 (out, err) = capfd.readouterr()
 assert ('export.zip' in out)

@ pytest . mark . cmd @ pytest . mark . django_db def test_export_path ( capfd , export_dir , cd_export_dir ) : call_command ( 'export' , '--path=/language0' ) ( out , err ) = capfd . readouterr ( ) assert ( 'language0.zip' in out ) assert ( 'language1.zip' not in out ) call_command ( 'export' , '--path=/language0/project0' ) ( out , err ) = capfd . readouterr ( ) assert ( 'language0-project0.zip' in out ) call_command ( 'export' , '--path=/language0/project0/store0.po' ) ( out , err ) = capfd . readouterr ( ) assert ( 'store0.po' in out ) call_command ( 'export' , '--path=/' ) ( out , err ) = capfd . readouterr ( ) assert ( 'export.zip' in out )
export a path testing variants of lang .