def test_convert(self): options = {"true": True, "false": False, "string": "foo", "int": 1, "long": 1L, "none": None, "hy-phen": "foo"} expected = [ ("UWSGI_TRUE", "true"), ("UWSGI_FALSE", "false"), ("UWSGI_STRING", "foo"), ("UWSGI_INT", "1"), ("UWSGI_LONG", "1"), ("UWSGI_HY_PHEN", "foo"), ] assert set(convert_options_to_env(options)) == set(expected)
def test_convert(self): options = { "true": True, "false": False, "string": "foo", "int": 1, "none": None, "hy-phen": "foo", } expected = [ ("UWSGI_TRUE", "true"), ("UWSGI_FALSE", "false"), ("UWSGI_STRING", "foo"), ("UWSGI_INT", "1"), ("UWSGI_HY_PHEN", "foo"), ] assert set(convert_options_to_env(options)) == set(expected)
def test_convert(self): options = { 'true': True, 'false': False, 'string': 'foo', 'int': 1, 'none': None, 'hy-phen': 'foo', } expected = [ ('UWSGI_TRUE', 'true'), ('UWSGI_FALSE', 'false'), ('UWSGI_STRING', 'foo'), ('UWSGI_INT', '1'), ('UWSGI_HY_PHEN', 'foo'), ] assert set(convert_options_to_env(options)) == set(expected)
'false': False, 'string': 'foo', 'int': 1, 'long': 1L, 'none': None, 'hy-phen': 'foo', } expected = [ ('UWSGI_TRUE', 'true'), ('UWSGI_FALSE', 'false'), ('UWSGI_STRING', 'foo'), ('UWSGI_INT', '1'), ('UWSGI_LONG', '1'), ('UWSGI_HY_PHEN', 'foo'), ] assert set(convert_options_to_env(options)) == set(expected) def test_options(self): cls = SentryHTTPServer server = cls(host='1.1.1.1', port=80) assert server.options['http-socket'] == '1.1.1.1:80' with override_settings(SENTRY_WEB_HOST='1.1.1.1', SENTRY_WEB_PORT=80): assert server.options['http-socket'] == '1.1.1.1:80' server = cls(workers=10) assert server.options['workers'] == 10 # Make sure that changing `protocol` to uwsgi sets the right socket options = {'protocol': 'uwsgi'}