def get_test_uids(offset=0, count=1, pootle_path='^/language0/'):
 from pootle_store.constants import TRANSLATED
 from pootle_store.models import Unit
 units = Unit.objects.filter(store__pootle_path__regex=pootle_path).filter(state=TRANSLATED)
 begin = ((units.count() / 2) + offset)
 return list(units[begin:(begin + count)].values_list('pk', flat=True))

def get_test_uids ( offset = 0 , count = 1 , pootle_path = '^/language0/' ) : from pootle_store . constants import TRANSLATED from pootle_store . models import Unit units = Unit . objects . filter ( store__pootle_path__regex = pootle_path ) . filter ( state = TRANSLATED ) begin = ( ( units . count ( ) / 2 ) + offset ) return list ( units [ begin : ( begin + count ) ] . values_list ( 'pk' , flat = True ) )
returns a list translated unit uids from ~middle of translated units dataset .