Exemple #1
0
    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
Exemple #2
0
 def test_agency_is_nullable(self):
     """Test null agency."""
     idol = Idol(1, 'foo', 18)
     idol.save()
     assert idol.agency is None
Exemple #3
0
 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
Exemple #4
0
 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)