Ejemplo n.º 1
0
 def setUpClass(cls):
     cls.package = package = make_package()
     settings = {
         'pyramid.debug_authorization': True,
         'pypi.db': 'tests.test_security.GlobalDummyCache',
         'pypi.storage': 'tests.test_security.GlobalDummyStorage',
         'session.validate_key': 'a',
         'user.user': sha256_crypt.encrypt('user'),
         'user.user2': sha256_crypt.encrypt('user2'),
         'package.%s.group.authenticated' % package.name: 'r',
         'package.%s.group.brotatos' % package.name: 'rw',
         'group.brotatos': ['user2'],
     }
     app = main({}, **settings)
     cls.app = webtest.TestApp(app)
Ejemplo n.º 2
0
 def setUpClass(cls):
     cls.package = package = make_package()
     settings = {
         "pyramid.debug_authorization": True,
         "pypi.db": "tests.test_security.GlobalDummyCache",
         "pypi.storage": "tests.test_security.GlobalDummyStorage",
         "session.validate_key": "a",
         "user.user": sha256_crypt.encrypt("user"),
         "user.user2": sha256_crypt.encrypt("user2"),
         "package.%s.group.authenticated" % package.name: "r",
         "package.%s.group.brotatos" % package.name: "rw",
         "group.brotatos": ["user2"],
     }
     app = main({}, **settings)
     cls.app = webtest.TestApp(app)
Ejemplo n.º 3
0
 def setUpClass(cls):
     cls.package = package = make_package()
     settings = {
         'pyramid.debug_authorization': True,
         'pypi.db': 'tests.test_security.GlobalDummyCache',
         'pypi.storage': 'tests.test_security.GlobalDummyStorage',
         'session.validate_key': 'a',
         'user.user': sha256_crypt.encrypt('user'),
         'user.user2': sha256_crypt.encrypt('user2'),
         'package.%s.group.authenticated' % package.name: 'r',
         'package.%s.group.brotatos' % package.name: 'rw',
         'group.brotatos': ['user2'],
     }
     app = main({}, **settings)
     cls.app = webtest.TestApp(app)
Ejemplo n.º 4
0
 def setUpClass(cls):
     cls.package = package = make_package()
     settings = {
         "pyramid.debug_authorization": True,
         "pypi.db": "tests.test_security.GlobalDummyCache",
         "pypi.storage": "tests.test_security.GlobalDummyStorage",
         "session.validate_key": "a",
         "user.user": sha256_crypt.encrypt("user"),
         "user.user2": sha256_crypt.encrypt("user2"),
         "package.%s.group.authenticated" % package.name: "r",
         "package.%s.group.brotatos" % package.name: "rw",
         "group.brotatos": ["user2"],
     }
     app = main({}, **settings)
     cls.app = webtest.TestApp(app)
Ejemplo n.º 5
0
 def setUpClass(cls):
     settings = {
         'pyramid.debug_authorization': True,
         'pypi.db': 'tests.test_security.test_cache',
         'db.url': 'sqlite://',
         'session.validate_key': 'a',
         'aws.access_key': 'abc',
         'aws.secret_key': 'def',
         'aws.bucket': 's3bucket',
         'user.user': sha256_crypt.encrypt('user'),
         'user.user2': sha256_crypt.encrypt('user2'),
         'package.pkg1.group.authenticated': 'r',
         'package.pkg1.group.brotatos': 'rw',
         'group.brotatos': ['user2'],
     }
     cls.app = webtest.TestApp(main({}, **settings))
Ejemplo n.º 6
0
 def setUpClass(cls):
     settings = {
         'pyramid.debug_authorization': True,
         'pypi.db': 'tests.test_security.test_cache',
         'db.url': 'sqlite://',
         'session.validate_key': 'a',
         'aws.access_key': 'abc',
         'aws.secret_key': 'def',
         'aws.bucket': 's3bucket',
         'user.user': sha256_crypt.encrypt('user'),
         'user.user2': sha256_crypt.encrypt('user2'),
         'package.pkg1.group.authenticated': 'r',
         'package.pkg1.group.brotatos': 'rw',
         'group.brotatos': ['user2'],
     }
     cls.app = webtest.TestApp(main({}, **settings))