forked from github.com/pypiserver
Merge pull request #173 from bertjwregeer/bugfix/multiple_servers
Allow creating multiple servers using Paste
This commit is contained in:
commit
d62d81309b
@ -1,4 +1,5 @@
|
||||
import re as _re
|
||||
import sys
|
||||
|
||||
version = __version__ = "1.2.1.dev0"
|
||||
__version_info__ = tuple(_re.split('[.-]', __version__))
|
||||
@ -120,7 +121,10 @@ def app(**kwds):
|
||||
:func:`default_config()`. Check the docstring of this function
|
||||
for supported kwds.
|
||||
"""
|
||||
from . import core, _app
|
||||
from . import core
|
||||
|
||||
_app = __import__("_app", globals(), locals(), ["."], 1)
|
||||
sys.modules.pop('pypiserver._app', None)
|
||||
|
||||
kwds = default_config(**kwds)
|
||||
config, packages = core.configure(**kwds)
|
||||
|
@ -35,5 +35,7 @@ def test_paste_app_factory(conf_options, monkeypatch):
|
||||
lambda **x: (x, [x.keys()]))
|
||||
pypiserver.paste_app_factory({}, **conf_options)
|
||||
|
||||
|
||||
|
||||
def test_app_factory(monkeypatch):
|
||||
monkeypatch.setattr('pypiserver.core.configure',
|
||||
lambda **x: (x, [x.keys()]))
|
||||
assert pypiserver.app() is not pypiserver.app()
|
||||
|
Loading…
Reference in New Issue
Block a user