import datetime from BreCal.stubs import generate_uuid1_int from BreCal.schemas.model import Ship def get_ship_simple(): ship_id = generate_uuid1_int() name = "african halcyon".upper() # 'Schiffe_sample_format.xlsx' uses .upper() for every ship imo = 9343613 # assert str(len(imo))==7 callsign = 1234567 # up to 7 characters. assert str(len(callsign))<=7 participant_id = generate_uuid1_int() length = 177.13 # assert 0>length<=500 width = 28.4 # assert 0>width<=500 is_tug = False bollard_pull = None # only if is_tug participant_id = None # only if is_tug eni = "01234567" # Alternative to IMO. Dynamic assertion? assert len(str(eni))==8 created = datetime.datetime.now() modified = created+datetime.timedelta(seconds=10) deleted = modified+datetime.timedelta(seconds=3) ship = Ship( ship_id, name, imo, callsign, participant_id, length, width, is_tug, bollard_pull, eni, created, modified, deleted ) return ship