def test_can_convert_from_string_to_datetime(self):
     self.assertEquals(get_date_from_string('5/1/2011'), datetime.date(day=5, month=1, year=2011))
def create_ureporter_by_registration_date(date):
    return UreportContact(autoreg_join_date=get_date_from_string(date),
                          quit_date=get_date_from_string('13/1/2017'), responses=0,
                          questions=0, age=19, incoming=0, connection_pk=0, reporting_location_id=0, user_id=0).save()
def create_ureporter_with_gender(gender):
    return UreportContact(district="Kampala", autoreg_join_date=get_date_from_string("5/1/2011"),
                          quit_date=get_date_from_string('13/1/2017'), responses=0,
                          questions=0, age=12, incoming=0, connection_pk=0, reporting_location_id=0, user_id=0,
                          gender=gender).save()