Make tests unittest compatible