@@ -0,0 +1,1451 @@
+from unittest import TestCase%0A%0Afrom webob import Request%0A%0Afrom gimlet.factories import session_factory_factory%0A%0A%0Aclass TestSession(TestCase):%0A%0A    def _make_session(self, secret='secret', **options):%0A        request = Request.blank('/')%0A        return session_factory_factory(secret, **options)(request)%0A%0A    def test_session(self):%0A        sess = self._make_session()%0A        sess%5B'a'%5D = 'a'%0A        self.assertIn('a', sess)%0A        self.assertIn('a', sess.channels%5B'insecure'%5D)%0A%0A    def test_session_secure_nonperm(self):%0A        sess = self._make_session(secure=True, fake_https=True)%0A        sess%5B'a'%5D = 'a'%0A        self.assertIn('a', sess.channels%5B'secure_nonperm'%5D)%0A        self.assertNotIn('a', sess.channels%5B'insecure'%5D)%0A        self.assertNotIn('a', sess.channels%5B'secure_perm'%5D)%0A%0A    def test_session_secure_perm(self):%0A        sess = self._make_session(secure=True, permanent=True, fake_https=True)%0A        sess%5B'a'%5D = 'a'%0A        self.assertIn('a', sess.channels%5B'secure_perm'%5D)%0A        self.assertNotIn('a', sess.channels%5B'insecure'%5D)%0A        self.assertNotIn('a', sess.channels%5B'secure_nonperm'%5D)%0A%0A    def test_session_set_insecure(self):%0A        sess = self._make_session(secure=True, permanent=True, fake_https=True)%0A        sess.set('a', 'a', secure=False)%0A        self.assertIn('a', sess.channels%5B'insecure'%5D)%0A        self.assertNotIn('a', sess.channels%5B'secure_perm'%5D)%0A        self.assertNotIn('a', sess.channels%5B'secure_nonperm'%5D)%0A

Add unit tests for Session