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)
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)
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))