def test_update_with_none(self): interval = intervals.IntInterval('(,)') building = self.create_building(interval) building.persons_at_night = None assert building.persons_at_night is None self.session.commit() assert building.persons_at_night is None
def test_update_with_none(self, session, create_building): interval = intervals.IntInterval([None, None]) building = create_building(interval) building.persons_at_night = None assert building.persons_at_night is None session.commit() assert building.persons_at_night is None
def test_nullify_number_range(self, session, Building): building = Building(persons_at_night=intervals.IntInterval([1, 3])) session.add(building) session.commit() building = session.query(Building).first() building.persons_at_night = None session.commit() building = session.query(Building).first() assert building.persons_at_night is None
def test_nullify_number_range(self): car = self.Car(price_range=intervals.IntInterval([1, 3])) self.session.add(car) self.session.commit() car = self.session.query(self.Car).first() car.price_range = None self.session.commit() car = self.session.query(self.Car).first() assert car.price_range is None