def test_check_expired_pass_to_data(self):
        # the UserIdentifier call should be forwarded to the
        # UserData item
        data_mock = Mock(UserData)
        data_mock.check_expired.return_value = True

        user_id = UserIdentifier('name', 'device')
        user_id.user_data = data_mock

        self.assertTrue(user_id.check_expired())
        data_mock.check_expired.assert_called_once()

        data_mock.reset_mock()
        self.assertTrue(user_id.check_expired(True))
        data_mock.check_expired.assert_called_once_with(True)
    def test_check_expired_no_data(self):
        user_id = UserIdentifier('name', 'device')

        self.assertFalse(user_id.check_expired())
        self.assertFalse(user_id.check_expired(True))