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