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