import unittest
from client import SnapchatClient

class TestSnapchatClient(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.client = SnapchatClient(headless=True)
        cls.username = "kyliejenner" # Extremely active account, guaranteed to have data
        cls.full_data = cls.client.get_full_data(cls.username)

    def test_get_profile(self):
        self.assertIsNotNone(self.full_data)
        profile = self.full_data.get('profile')
        self.assertIsNotNone(profile)
        self.assertEqual(profile.get('username'), self.username)

    def test_get_highlights(self):
        self.assertIsNotNone(self.full_data)
        curated = self.full_data.get('curatedHighlights', [])
        spotlight = self.full_data.get('spotlightHighlights', [])
        # Should have at least one highlight
        self.assertTrue(len(curated) > 0 or len(spotlight) > 0)

    def test_get_story(self):
        self.assertIsNotNone(self.full_data)
        story = self.full_data.get('story')
        # Could be empty dict if no active stories, but key should exist
        self.assertTrue(story is not None)

if __name__ == '__main__':
    unittest.main()
