# Path: responsebot/models.py
# class User(object):
#     """
#     Represents a user. E.g. you can get a user's screen name via it's :code:`screen_name` property
#     (:code:`user.screen_name`). All properties except :code:`status` have the same name as Twitter defined them `here
#     <https://dev.twitter.com/overview/api/users>`_. :code:`status` is renamed to :code:`tweet`.
#     """
#     def __init__(self, data):
#         """
#         :param data: Parsed JSON data
#         :type data: dictionary
#         """
#         self.raw_data = data
# 
#         for key, value in data.items():
#             if key == 'created_at':
#                 setattr(self, key, parse(value))
#             elif key == 'status':
#                 setattr(self, 'tweet', Tweet(value))
#             elif key == 'following':
#                 setattr(self, key, value is True)
#             else:
#                 setattr(self, key, value)
# 
# class Tweet(object):
#     """
#     Represents a tweet. E.g. you can get a tweet's text via it's :code:`text` property (:code:`tweet.text`).
#     All properties except :code:`retweeted_status`, :code:`quoted_status`, :code:`quoted_status_id_str`, :code:`in_reply_to_status_id`
#     and :code:`in_reply_sto_status_id_str` have the same name as Twitter defined them `here <https://dev.twitter.com/overview/api/tweets>`_.
#     :code:`retweeted_status` is renamed to :code:`retweeted_tweet`, similar for other properties above.
#     """
#     def __init__(self, data):
#         """
#         :param data: Parsed JSON data
#         :type data: dictionary
#         """
#         self.raw_data = data
# 
#         # TODO: handle place. source, quoted_status_id_str
#         for key, value in data.items():
#             if key == 'user':
#                 setattr(self, key, User(value))
#             elif key == 'created_at':
#                 setattr(self, key, parse(value))
#             elif key == 'retweeted_status':
#                 setattr(self, 'retweeted_tweet', Tweet(value))
#             elif key == 'quoted_status':
#                 setattr(self, 'quoted_tweet', Tweet(value))
#             elif key == 'quoted_status_id_str':
#                 setattr(self, 'quoted_tweet_id_str', value)
#             elif key == 'in_reply_to_status_id':
#                 setattr(self, 'in_reply_to_tweet_id', value)
#             elif key == 'in_reply_to_status_id_str':
#                 setattr(self, 'in_reply_to_tweet_id_str', value)
#             else:
#                 setattr(self, key, value)


from unittest.case import TestCase
from dateutil.parser import parse
from responsebot.models import User, Tweet




class UserModelTestCase(TestCase):
    def test_create_from_raw_data(self):
        created_at = 'Mon Apr 25 08:25:58 +0000 2016'
        raw = {
            'some_key': 'some value',
            'created_at': created_at,

# Path: responsebot/models.py
# class User(object):
#     """
#     Represents a user. E.g. you can get a user's screen name via it's :code:`screen_name` property
#     (:code:`user.screen_name`). All properties except :code:`status` have the same name as Twitter defined them `here
#     <https://dev.twitter.com/overview/api/users>`_. :code:`status` is renamed to :code:`tweet`.
#     """
#     def __init__(self, data):
#         """
#         :param data: Parsed JSON data
#         :type data: dictionary
#         """
#         self.raw_data = data
# 
#         for key, value in data.items():
#             if key == 'created_at':
#                 setattr(self, key, parse(value))
#             elif key == 'status':
#                 setattr(self, 'tweet', Tweet(value))
#             elif key == 'following':
#                 setattr(self, key, value is True)
#             else:
#                 setattr(self, key, value)
# 
# class Tweet(object):
#     """
#     Represents a tweet. E.g. you can get a tweet's text via it's :code:`text` property (:code:`tweet.text`).
#     All properties except :code:`retweeted_status`, :code:`quoted_status`, :code:`quoted_status_id_str`, :code:`in_reply_to_status_id`
#     and :code:`in_reply_sto_status_id_str` have the same name as Twitter defined them `here <https://dev.twitter.com/overview/api/tweets>`_.
#     :code:`retweeted_status` is renamed to :code:`retweeted_tweet`, similar for other properties above.
#     """
#     def __init__(self, data):
#         """
#         :param data: Parsed JSON data
#         :type data: dictionary
#         """
#         self.raw_data = data
# 
#         # TODO: handle place. source, quoted_status_id_str
#         for key, value in data.items():
#             if key == 'user':
#                 setattr(self, key, User(value))
#             elif key == 'created_at':
#                 setattr(self, key, parse(value))
#             elif key == 'retweeted_status':
#                 setattr(self, 'retweeted_tweet', Tweet(value))
#             elif key == 'quoted_status':
#                 setattr(self, 'quoted_tweet', Tweet(value))
#             elif key == 'quoted_status_id_str':
#                 setattr(self, 'quoted_tweet_id_str', value)
#             elif key == 'in_reply_to_status_id':
#                 setattr(self, 'in_reply_to_tweet_id', value)
#             elif key == 'in_reply_to_status_id_str':
#                 setattr(self, 'in_reply_to_tweet_id_str', value)
#             else:
#                 setattr(self, key, value)


# Path: tests/unit_tests/models/test_user_model.py
from unittest.case import TestCase
from dateutil.parser import parse
from responsebot.models import User, Tweet





class UserModelTestCase(TestCase):
    def test_create_from_raw_data(self):
        created_at = 'Mon Apr 25 08:25:58 +0000 2016'
        raw = {
            'some_key': 'some value',
            'created_at': created_at,

            'status': {