def test_get_editor_filter():
 assert (get_editor_filter(state='untranslated') == '#filter=untranslated')
 assert (get_editor_filter(state='untranslated', sort='newest') == '#filter=untranslated&sort=newest')
 assert (get_editor_filter(sort='newest') == '#sort=newest')
 assert (get_editor_filter(state='all', search='Foo', sfields='locations') == '#filter=all')
 assert (get_editor_filter(search='Foo', sfields='locations') == '#search=Foo&sfields=locations')
 assert (get_editor_filter(search='Foo', sfields=['locations', 'notes']) == '#search=Foo&sfields=locations,notes')
 assert (get_editor_filter(search='Foo: bar.po\nID: 1', sfields='locations') == '#search=Foo%3A+bar.po%0AID%3A+1&sfields=locations')

def test_get_editor_filter ( ) : assert ( get_editor_filter ( state = 'untranslated' ) == '#filter=untranslated' ) assert ( get_editor_filter ( state = 'untranslated' , sort = 'newest' ) == '#filter=untranslated&sort=newest' ) assert ( get_editor_filter ( sort = 'newest' ) == '#sort=newest' ) assert ( get_editor_filter ( state = 'all' , search = 'Foo' , sfields = 'locations' ) == '#filter=all' ) assert ( get_editor_filter ( search = 'Foo' , sfields = 'locations' ) == '#search=Foo&sfields=locations' ) assert ( get_editor_filter ( search = 'Foo' , sfields = [ 'locations' , 'notes' ] ) == '#search=Foo&sfields=locations,notes' ) assert ( get_editor_filter ( search = 'Foo: bar.po\nID: 1' , sfields = 'locations' ) == '#search=Foo%3A+bar.po%0AID%3A+1&sfields=locations' )
tests editor filters are correctly constructed .