def test_get_by_idx(self): """Get idol by Mnet index.""" idol = Idol(1, 'foo', 18) idol.save() retrieved = Idol.get_by_id(idol.idx) assert retrieved == idol
def test_agency_is_nullable(self): """Test null agency.""" idol = Idol(1, 'foo', 18) idol.save() assert idol.agency is None
def test_last_name_en_is_nullable(self): """Test null name.""" idol = Idol(1, 'foo', 18) idol.save() assert idol.last_name_en is None
def test_last_updated_defaults_to_datetime(self): """Test update date.""" idol = Idol(1, 'foo', 18) idol.save() assert bool(idol.last_updated) assert isinstance(idol.last_updated, dt.datetime)