def create_voucher():
 voucher = Voucher.objects.create(name=u'D\xf9\uff4d\u03fb\u03d2 voucher', code='test', start_datetime=timezone.now(), end_datetime=(timezone.now() + datetime.timedelta(days=12)))
 voucher.offers.add(create_offer(offer_type='Voucher'))
 return voucher

def create_voucher ( ) : voucher = Voucher . objects . create ( name = u'D\xf9\uff4d\u03fb\u03d2 voucher' , code = 'test' , start_datetime = timezone . now ( ) , end_datetime = ( timezone . now ( ) + datetime . timedelta ( days = 12 ) ) ) voucher . offers . add ( create_offer ( offer_type = 'Voucher' ) ) return voucher
helper method for creating a voucher .