@pytest.mark.cmd
@pytest.mark.django_db
def test_export_path_unknown():
 with pytest.raises(CommandError) as e:
  call_command('export', '--path=/af/unknown')
 assert ("Could not find store matching '/af/unknown'" in str(e))

@ pytest . mark . cmd @ pytest . mark . django_db def test_export_path_unknown ( ) : with pytest . raises ( CommandError ) as e : call_command ( 'export' , '--path=/af/unknown' ) assert ( "Could not find store matching '/af/unknown'" in str ( e ) )
export an unknown path .