def check_token(self, token):

        if not hasattr(token, 'timestamp'):
            raise AttributeError('token doesn\'t have a timestamp attribute')

        if (int(token.timestamp) + 3600) < time.time():
            token = self.refresh_token(token)

        return token
Test if reference is created for model found with natural key.
dataset/ETHPy150Open project-fondue/python-yql/yql/__init__.py/ThreeLegged.check_token--crossover with--dataset/ETHPy150Open zlorf/django-synchro/synchro/tests.py/SimpleSynchroTests.test_reference2