# Path: pyvac/tests/case.py
# class ModelTestCase(TestCase):
# class DummyRoute(object):
# class DummyRequest(testing.DummyRequest):
# class UnauthenticatedViewTestCase(TestCase):
# class ViewTestCase(UnauthenticatedViewTestCase):
# class ViewAdminTestCase(ViewTestCase):
#     def setUp(self):
#     def tearDown(self):
#     def auto_translate(string, country):
#     def __init__(self, methodName='runTest'):
#     def setUp(self):
#     def tearDown(self):
#     def create_request(self, params=None, environ=None, matchdict=None,
#                        headers=None, path='/', cookies=None, post=None, **kw):
#     def assertIsRedirect(self, view):
#     def setUp(self):
#     def set_userid(self, userid='admin', permissive=False):
#     def setUp(self):


from datetime import datetime
from freezegun import freeze_time
from mock import patch, PropertyMock
from pyvac.tests import case
        from pyvac.views import Home
        from pyvac.views import Home
        from pyvac.views import Home
        from pyvac.views import Home
                         ignore=['celery', 'psycopg2', 'sqlalchemy',
                                 'icalendar']):
            view = Home(self.create_request())()
        self.assertEqual(set(view.keys()),
                         set(['matched_route', 'types', 'csrf_token',
                              'pyvac', 'holidays', 'sudo_users',
                              'exception_info_tooltip',
                              'recovered_info_tooltip', 'recovered_cp',
                              'futures_approved', 'futures_pending',
                              'futures_breakdown']))
        self.assertEqual(len(view['types']), 5)
        self.assertEqual(len(view['holidays']), 22)

    def test_render_user_rtt_ok(self):
        self.config.testing_securitypolicy(userid='jdoe',
                                           permissive=True)
        with freeze_time('2014-12-25',
                         ignore=['celery', 'psycopg2', 'sqlalchemy',
                                 'icalendar']):
            with patch('pyvac.models.User.arrival_date',
                       new_callable=PropertyMock) as mock_foo:
                mock_foo.return_value = datetime(2014, 1, 1)
                view = Home(self.create_request())()
                self.assertEqual(set(view.keys()),
                                 set(['matched_route', 'types',
                                      'csrf_token',
                                      'pyvac', 'holidays', 'sudo_users',
                                      'exception_info_tooltip',
                                      'recovered_info_tooltip',
                                      'recovered_cp',

# Path: pyvac/tests/case.py
# class ModelTestCase(TestCase):
# class DummyRoute(object):
# class DummyRequest(testing.DummyRequest):
# class UnauthenticatedViewTestCase(TestCase):
# class ViewTestCase(UnauthenticatedViewTestCase):
# class ViewAdminTestCase(ViewTestCase):
#     def setUp(self):
#     def tearDown(self):
#     def auto_translate(string, country):
#     def __init__(self, methodName='runTest'):
#     def setUp(self):
#     def tearDown(self):
#     def create_request(self, params=None, environ=None, matchdict=None,
#                        headers=None, path='/', cookies=None, post=None, **kw):
#     def assertIsRedirect(self, view):
#     def setUp(self):
#     def set_userid(self, userid='admin', permissive=False):
#     def setUp(self):


# Path: pyvac/tests/views/test_home.py
from datetime import datetime
from freezegun import freeze_time
from mock import patch, PropertyMock
from pyvac.tests import case
        from pyvac.views import Home
        from pyvac.views import Home
        from pyvac.views import Home
        from pyvac.views import Home

                         ignore=['celery', 'psycopg2', 'sqlalchemy',
                                 'icalendar']):
            view = Home(self.create_request())()
        self.assertEqual(set(view.keys()),
                         set(['matched_route', 'types', 'csrf_token',
                              'pyvac', 'holidays', 'sudo_users',
                              'exception_info_tooltip',
                              'recovered_info_tooltip', 'recovered_cp',
                              'futures_approved', 'futures_pending',
                              'futures_breakdown']))
        self.assertEqual(len(view['types']), 5)
        self.assertEqual(len(view['holidays']), 22)

    def test_render_user_rtt_ok(self):
        self.config.testing_securitypolicy(userid='jdoe',
                                           permissive=True)
        with freeze_time('2014-12-25',
                         ignore=['celery', 'psycopg2', 'sqlalchemy',
                                 'icalendar']):
            with patch('pyvac.models.User.arrival_date',
                       new_callable=PropertyMock) as mock_foo:
                mock_foo.return_value = datetime(2014, 1, 1)
                view = Home(self.create_request())()
                self.assertEqual(set(view.keys()),
                                 set(['matched_route', 'types',
                                      'csrf_token',
                                      'pyvac', 'holidays', 'sudo_users',
                                      'exception_info_tooltip',
                                      'recovered_info_tooltip',
                                      'recovered_cp',

                                      'futures_approved', 'futures_pending',