Commit b6793cda authored by Stefane Fermigier's avatar Stefane Fermigier

Format w/ yapf.

parent 64486df0
...@@ -12,11 +12,9 @@ manager = Manager(app) ...@@ -12,11 +12,9 @@ manager = Manager(app)
def initdb(): def initdb():
db.create_all() db.create_all()
db.session.add( db.session.add(
User( User(username="admin", email="admin@admin.com", password='admin'))
username="admin", email="admin@admin.com", password='admin'))
db.session.add( db.session.add(
User( User(username="demo", email="demo@demo.com", password="demo"))
username="demo", email="demo@demo.com", password="demo"))
db.session.commit() db.session.commit()
print('Initialized the database') print('Initialized the database')
......
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
import sys import sys
from core.services.xmla import start_server from core.services.xmla import start_server
......
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
import itertools
import os import os
import re import re
from collections import OrderedDict from collections import OrderedDict
import itertools
import numpy as np import numpy as np
import pandas as pd import pandas as pd
...@@ -51,9 +51,8 @@ class MdxEngine: ...@@ -51,9 +51,8 @@ class MdxEngine:
location = os.path.join( location = os.path.join(
os.path.abspath( os.path.abspath(
os.path.join( os.path.join(os.path.dirname(__file__), "..", "..", "..",
os.path.dirname(__file__), "..", "..", "..", "..")), "..")), MdxEngine.CUBE_FOLDER)
MdxEngine.CUBE_FOLDER)
return [ return [
file for file in os.listdir(location) file for file in os.listdir(location)
if os.path.isdir(os.path.join(location, file)) if os.path.isdir(os.path.join(location, file))
...@@ -68,9 +67,8 @@ class MdxEngine: ...@@ -68,9 +67,8 @@ class MdxEngine:
''' '''
return os.path.join( return os.path.join(
os.path.abspath( os.path.abspath(
os.path.join( os.path.join(os.path.dirname(__file__), '..', "..", '..',
os.path.dirname(__file__), '..', "..", '..', '..')), '..')), self.cube_folder)
self.cube_folder)
def _load_tables(self): def _load_tables(self):
""" """
...@@ -455,7 +453,9 @@ class MdxEngine: ...@@ -455,7 +453,9 @@ class MdxEngine:
tables_n_columns = self.get_tables_and_columns(query_axes) tables_n_columns = self.get_tables_and_columns(query_axes)
columns_to_keep = OrderedDict( columns_to_keep = OrderedDict(
(table, columns) for table, columns in tables_n_columns['all'].items() if table != self.facts) (table, columns)
for table, columns in tables_n_columns['all'].items()
if table != self.facts)
# if we have measures on axes we have to ignore them # if we have measures on axes we have to ignore them
tuples_on_mdx_query = [ tuples_on_mdx_query = [
...@@ -499,8 +499,7 @@ class MdxEngine: ...@@ -499,8 +499,7 @@ class MdxEngine:
self.execute_one_tuple(tupl, start_df, self.execute_one_tuple(tupl, start_df,
columns_to_keep.values())) columns_to_keep.values()))
cols = list( cols = list(itertools.chain.from_iterable(columns_to_keep.values()))
itertools.chain.from_iterable(columns_to_keep.values()))
# TODO BUG !!! https://github.com/pandas-dev/pandas/issues/15525 # TODO BUG !!! https://github.com/pandas-dev/pandas/issues/15525
# solution 1 .astype(str) ( take a lot of time from execution) # solution 1 .astype(str) ( take a lot of time from execution)
......
...@@ -10,26 +10,21 @@ ...@@ -10,26 +10,21 @@
# Any changes you make to it will be overwritten the next time # Any changes you make to it will be overwritten the next time
# the file is generated. # the file is generated.
from __future__ import (absolute_import, division, print_function,
from __future__ import print_function, division, absolute_import, unicode_literals unicode_literals)
from grako.buffering import Buffer from grako.buffering import Buffer
from grako.parsing import graken, Parser from grako.parsing import Parser, graken
from grako.util import re, RE_FLAGS, generic_main # noqa from grako.util import RE_FLAGS, generic_main, re # noqa
__all__ = [ __all__ = ['MdxParserGen', 'UnknownSemantics', 'main']
'MdxParserGen',
'UnknownSemantics',
'main'
]
KEYWORDS = {} KEYWORDS = {}
class UnknownBuffer(Buffer): class UnknownBuffer(Buffer):
def __init__(
self, def __init__(self,
text, text,
whitespace=None, whitespace=None,
nameguard=None, nameguard=None,
...@@ -37,8 +32,7 @@ class UnknownBuffer(Buffer): ...@@ -37,8 +32,7 @@ class UnknownBuffer(Buffer):
eol_comments_re=None, eol_comments_re=None,
ignorecase=None, ignorecase=None,
namechars='', namechars='',
**kwargs **kwargs):
):
super(UnknownBuffer, self).__init__( super(UnknownBuffer, self).__init__(
text, text,
whitespace=whitespace, whitespace=whitespace,
...@@ -47,13 +41,12 @@ class UnknownBuffer(Buffer): ...@@ -47,13 +41,12 @@ class UnknownBuffer(Buffer):
eol_comments_re=eol_comments_re, eol_comments_re=eol_comments_re,
ignorecase=ignorecase, ignorecase=ignorecase,
namechars=namechars, namechars=namechars,
**kwargs **kwargs)
)
class MdxParserGen(Parser): class MdxParserGen(Parser):
def __init__(
self, def __init__(self,
whitespace=None, whitespace=None,
nameguard=None, nameguard=None,
comments_re=None, comments_re=None,
...@@ -64,8 +57,7 @@ class MdxParserGen(Parser): ...@@ -64,8 +57,7 @@ class MdxParserGen(Parser):
keywords=None, keywords=None,
namechars='', namechars='',
buffer_class=UnknownBuffer, buffer_class=UnknownBuffer,
**kwargs **kwargs):
):
if keywords is None: if keywords is None:
keywords = KEYWORDS keywords = KEYWORDS
super(MdxParserGen, self).__init__( super(MdxParserGen, self).__init__(
...@@ -79,8 +71,7 @@ class MdxParserGen(Parser): ...@@ -79,8 +71,7 @@ class MdxParserGen(Parser):
keywords=keywords, keywords=keywords,
namechars=namechars, namechars=namechars,
buffer_class=buffer_class, buffer_class=buffer_class,
**kwargs **kwargs)
)
@graken() @graken()
def _MDX_statement_(self): def _MDX_statement_(self):
...@@ -105,10 +96,10 @@ class MdxParserGen(Parser): ...@@ -105,10 +96,10 @@ class MdxParserGen(Parser):
self._condition_specification_() self._condition_specification_()
self.name_last_node('condition_specification') self.name_last_node('condition_specification')
self._check_eof() self._check_eof()
self.ast._define( self.ast._define([
['axis_specification_columns', 'axis_specification_rows', 'condition_specification', 'cube_specification', 'name'], 'axis_specification_columns', 'axis_specification_rows',
[] 'condition_specification', 'cube_specification', 'name'
) ], [])
@graken() @graken()
def _axis_specification_(self): def _axis_specification_(self):
...@@ -148,6 +139,7 @@ class MdxParserGen(Parser): ...@@ -148,6 +139,7 @@ class MdxParserGen(Parser):
self._operator_() self._operator_()
self.name_last_node('@') self.name_last_node('@')
self._dim_props_type_() self._dim_props_type_()
self._closure(block1) self._closure(block1)
@graken() @graken()
...@@ -173,6 +165,7 @@ class MdxParserGen(Parser): ...@@ -173,6 +165,7 @@ class MdxParserGen(Parser):
self._comma_() self._comma_()
self.name_last_node('@') self.name_last_node('@')
self._dim_props_op_() self._dim_props_op_()
self._closure(block1) self._closure(block1)
@graken() @graken()
...@@ -197,6 +190,7 @@ class MdxParserGen(Parser): ...@@ -197,6 +190,7 @@ class MdxParserGen(Parser):
self._error('no available options') self._error('no available options')
self._dim_props_ligne_() self._dim_props_ligne_()
self.name_last_node('@') self.name_last_node('@')
self._closure(block1) self._closure(block1)
@graken() @graken()
...@@ -248,6 +242,7 @@ class MdxParserGen(Parser): ...@@ -248,6 +242,7 @@ class MdxParserGen(Parser):
self.name_last_node('@') self.name_last_node('@')
with self._optional(): with self._optional():
self._right_bracket_() self._right_bracket_()
self._closure(block0) self._closure(block0)
@graken() @graken()
...@@ -305,6 +300,7 @@ class MdxParserGen(Parser): ...@@ -305,6 +300,7 @@ class MdxParserGen(Parser):
self.name_last_node('@') self.name_last_node('@')
with self._optional(): with self._optional():
self._right_bracket_() self._right_bracket_()
self._closure(block0) self._closure(block0)
with self._optional(): with self._optional():
self._right_parentheses_() self._right_parentheses_()
...@@ -347,7 +343,8 @@ class MdxParserGen(Parser): ...@@ -347,7 +343,8 @@ class MdxParserGen(Parser):
self._token('except') self._token('except')
with self._option(): with self._option():
self._token('extract') self._token('extract')
self._error('expecting one of: CROSSJOIN NONEMPTY except extract union') self._error(
'expecting one of: CROSSJOIN NONEMPTY except extract union')
@graken() @graken()
def _dimension_shortcut_(self): def _dimension_shortcut_(self):
...@@ -420,6 +417,7 @@ class MdxParserGen(Parser): ...@@ -420,6 +417,7 @@ class MdxParserGen(Parser):
class UnknownSemantics(object): class UnknownSemantics(object):
def MDX_statement(self, ast): def MDX_statement(self, ast):
return ast return ast
......
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
from grako.model import ModelBuilderSemantics from grako.model import ModelBuilderSemantics
from .gen_parser.mdxparser import MdxParserGen from .gen_parser.mdxparser import MdxParserGen
from .gen_parser.models import selectStatement from .gen_parser.models import selectStatement
......
...@@ -92,7 +92,7 @@ class Propertielist(ComplexModel): ...@@ -92,7 +92,7 @@ class Propertielist(ComplexModel):
class Command(ComplexModel): class Command(ComplexModel):
_type_info = {'Statement': Unicode, } _type_info = {'Statement': Unicode,}
class ExecuteRequest(ComplexModel): class ExecuteRequest(ComplexModel):
......
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
from lxml import etree
from datetime import datetime from datetime import datetime
from lxml import etree
from spyne import AnyXml, Application, ServiceBase, rpc from spyne import AnyXml, Application, ServiceBase, rpc
from spyne.protocol.soap import Soap11 from spyne.protocol.soap import Soap11
from spyne.server.wsgi import WsgiApplication from spyne.server.wsgi import WsgiApplication
from .xmla_execute_xsds import execute_xsd from ..services.models import DiscoverRequest, ExecuteRequest, Session
from .xmla_discover_tools import XmlaDiscoverTools from .xmla_discover_tools import XmlaDiscoverTools
from .xmla_execute_tools import XmlaExecuteTools from .xmla_execute_tools import XmlaExecuteTools
from ..services.models import DiscoverRequest, ExecuteRequest, Session from .xmla_execute_xsds import execute_xsd
class XmlaProviderService(ServiceBase): class XmlaProviderService(ServiceBase):
...@@ -81,8 +82,7 @@ class XmlaProviderService(ServiceBase): ...@@ -81,8 +82,7 @@ class XmlaProviderService(ServiceBase):
return discover_tools.discover_mdschema_measures__response(request) return discover_tools.discover_mdschema_measures__response(request)
elif request.RequestType == "MDSCHEMA_DIMENSIONS": elif request.RequestType == "MDSCHEMA_DIMENSIONS":
return discover_tools.discover_mdschema_dimensions_response( return discover_tools.discover_mdschema_dimensions_response(request)
request)
elif request.RequestType == "MDSCHEMA_HIERARCHIES": elif request.RequestType == "MDSCHEMA_HIERARCHIES":
return discover_tools.discover_mdschema_hierarchies_response( return discover_tools.discover_mdschema_hierarchies_response(
...@@ -100,8 +100,7 @@ class XmlaProviderService(ServiceBase): ...@@ -100,8 +100,7 @@ class XmlaProviderService(ServiceBase):
request) request)
elif request.RequestType == "MDSCHEMA_PROPERTIES": elif request.RequestType == "MDSCHEMA_PROPERTIES":
return discover_tools.discover_mdschema_properties_response( return discover_tools.discover_mdschema_properties_response(request)
request)
elif request.RequestType == "MDSCHEMA_MEMBERS": elif request.RequestType == "MDSCHEMA_MEMBERS":
return discover_tools.discover_mdschema_members_response(request) return discover_tools.discover_mdschema_members_response(request)
......
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
from .xmla_discover_xsds import discover_datasources_xsd, discover_preperties_xsd, discover_schema_rowsets_xsd, \ import uuid
discover_literals_xsd, mdschema_sets_xsd, mdschema_kpis_xsd, dbschema_catalogs_xsd, mdschema_cubes_xsd, \
dbschema_tables_xsd, mdschema_measures_xsd, mdschema_dimensions_xsd, mdschema_hierarchies_xsd, mdschema_levels_xsd, \
mdschema_measuresgroups_xsd, mdschema_measuresgroups_dimensions_xsd, mdschema_properties_PROPERTIES_xsd, \
mdschema_members_xsd
from lxml import etree from lxml import etree
from ..mdx.executor.execute import MdxEngine from ..mdx.executor.execute import MdxEngine
import uuid from .xmla_discover_xsds import (dbschema_catalogs_xsd, dbschema_tables_xsd,
discover_datasources_xsd,
discover_literals_xsd,
discover_preperties_xsd,
discover_schema_rowsets_xsd,
mdschema_cubes_xsd, mdschema_dimensions_xsd,
mdschema_hierarchies_xsd, mdschema_kpis_xsd,
mdschema_levels_xsd, mdschema_measures_xsd,
mdschema_measuresgroups_dimensions_xsd,
mdschema_measuresgroups_xsd,
mdschema_members_xsd,
mdschema_properties_PROPERTIES_xsd,
mdschema_sets_xsd)
# TODO clean # TODO clean
...@@ -67,6 +76,7 @@ class XmlaDiscoverTools(): ...@@ -67,6 +76,7 @@ class XmlaDiscoverTools():
</return>""") </return>""")
def discover_properties_response(self, request): def discover_properties_response(self, request):
def get_props(xsd, PropertyName, PropertyDescription, PropertyType, def get_props(xsd, PropertyName, PropertyDescription, PropertyType,
PropertyAccessType, IsRequired, Value): PropertyAccessType, IsRequired, Value):
return etree.fromstring(""" return etree.fromstring("""
...@@ -108,15 +118,15 @@ class XmlaDiscoverTools(): ...@@ -108,15 +118,15 @@ class XmlaDiscoverTools():
elif request.Restrictions.RestrictionList.PropertyName == 'MdpropMdxSubqueries': elif request.Restrictions.RestrictionList.PropertyName == 'MdpropMdxSubqueries':
if 'Unspecified' in request.Properties.PropertyList.Catalog: if 'Unspecified' in request.Properties.PropertyList.Catalog:
return get_props(discover_preperties_xsd, return get_props(discover_preperties_xsd, 'MdpropMdxSubqueries',
'MdpropMdxSubqueries', 'MdpropMdxSubqueries', 'MdpropMdxSubqueries', 'int', 'Read', 'false',
'int', 'Read', 'false', '15') '15')
if request.Properties.PropertyList.Catalog is not None: if request.Properties.PropertyList.Catalog is not None:
self.change_catalogue(request.Properties.PropertyList.Catalog) self.change_catalogue(request.Properties.PropertyList.Catalog)
return get_props(discover_preperties_xsd, return get_props(discover_preperties_xsd, 'MdpropMdxSubqueries',
'MdpropMdxSubqueries', 'MdpropMdxSubqueries', 'MdpropMdxSubqueries', 'int', 'Read', 'false',
'int', 'Read', 'false', '15') '15')
elif request.Restrictions.RestrictionList.PropertyName == 'MdpropMdxDrillFunctions': elif request.Restrictions.RestrictionList.PropertyName == 'MdpropMdxDrillFunctions':
if 'Unspecified' in request.Properties.PropertyList.Catalog: if 'Unspecified' in request.Properties.PropertyList.Catalog:
...@@ -2281,8 +2291,7 @@ class XmlaDiscoverTools(): ...@@ -2281,8 +2291,7 @@ class XmlaDiscoverTools():
</row> </row>
</root> </root>
</return> </return>
""".format(self.selected_catalogue, separed_tuple[ """.format(
0], joined, request.Restrictions.RestrictionList. self.selected_catalogue, separed_tuple[0], joined,
MEMBER_UNIQUE_NAME, ''.join( request.Restrictions.RestrictionList.MEMBER_UNIQUE_NAME,
c for c in separed_tuple[-1] ''.join(c for c in separed_tuple[-1] if c not in '[]')))
if c not in '[]')))
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
from collections import OrderedDict
import itertools import itertools
from collections import OrderedDict
class XmlaExecuteTools(): class XmlaExecuteTools():
...@@ -523,8 +522,8 @@ class XmlaExecuteTools(): ...@@ -523,8 +522,8 @@ class XmlaExecuteTools():
tuple = "" tuple = ""
# not used dimensions # not used dimensions
for dim_diff in list( for dim_diff in list(
set(self.executer.get_all_tables_names(ignore_fact=True)) - set(self.executer.get_all_tables_names(ignore_fact=True)) - set(
set([ [
table_name table_name
for table_name in mdx_execution_result['columns_desc'][ for table_name in mdx_execution_result['columns_desc'][
'all'] 'all']
......
...@@ -5,7 +5,6 @@ from flask import Flask ...@@ -5,7 +5,6 @@ from flask import Flask
from flask_login import LoginManager from flask_login import LoginManager
from flask_sqlalchemy import SQLAlchemy from flask_sqlalchemy import SQLAlchemy
basedir = os.path.abspath(os.path.dirname(__file__)) basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__) app = Flask(__name__)
app.config[ app.config[
......
...@@ -38,10 +38,8 @@ class IFrame(object): ...@@ -38,10 +38,8 @@ class IFrame(object):
params = "?" + six.moves.urllib.parse.urlencode(self.params) params = "?" + six.moves.urllib.parse.urlencode(self.params)
else: else:
params = "" params = ""
return self.iframe.format(src=self.src, return self.iframe.format(
width=self.width, src=self.src, width=self.width, height=self.height, params=params)
height=self.height,
params=params)
template = """ template = """
......
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
import json import json
import pandas as pd import pandas as pd
import plotly import plotly
import plotly.graph_objs as go import plotly.graph_objs as go
......
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
import itertools
import os import os
from io import BytesIO from io import BytesIO
from itertools import groupby from itertools import groupby
from operator import itemgetter from operator import itemgetter
import itertools
import pandas as pd import pandas as pd
from flask import flash, redirect, render_template, request, send_file, url_for from flask import flash, redirect, render_template, request, send_file, url_for
from flask_login import current_user, login_required, login_user, logout_user from flask_login import current_user, login_required, login_user, logout_user
...@@ -13,14 +13,14 @@ from pandas import DataFrame, Series ...@@ -13,14 +13,14 @@ from pandas import DataFrame, Series
from treelib import Tree from treelib import Tree
from treelib.tree import DuplicatedNodeIdError from treelib.tree import DuplicatedNodeIdError
from .forms import LoginForm, QueryForm
from .models import User
from olapy.web.pivottable import pivot_ui from olapy.web.pivottable import pivot_ui
from ..core.mdx.executor.execute import MdxEngine
from ..core.mdx.executor.execute import MdxEngine
from ..web import app, login_manager from ..web import app, login_manager
from ..web.logger import Logs from ..web.logger import Logs
from ..web.stats_utils import graphs from ..web.stats_utils import graphs
from .forms import LoginForm, QueryForm
from .models import User
# in pandas there is a problem with conversion multiindex dataframe to json # in pandas there is a problem with conversion multiindex dataframe to json
# to solve the export to excel problem we used a global variable # to solve the export to excel problem we used a global variable
...@@ -35,6 +35,7 @@ log_mdx = Logs('mdx') ...@@ -35,6 +35,7 @@ log_mdx = Logs('mdx')
class Nod: class Nod:
def __init__(self, text, id, parent): def __init__(self, text, id, parent):
self.text = text self.text = text
self.id = id self.id = id
...@@ -235,9 +236,10 @@ def stats(): ...@@ -235,9 +236,10 @@ def stats():
ex = MdxEngine(CUBE) ex = MdxEngine(CUBE)
graph = graphs() graph = graphs()
columns = list(itertools.chain.from_iterable( columns = list(
[[column for column in df.columns] for table_name, df in ex.tables_loaded.items() if itertools.chain.from_iterable([[column for column in df.columns]
table_name != ex.facts])) for table_name, df in ex.tables_loaded.
items() if table_name != ex.facts]))
columns.append(ex.measures[0]) columns.append(ex.measures[0])
temp_rslt = ex.load_star_schema_dataframe[columns].head(200) temp_rslt = ex.load_star_schema_dataframe[columns].head(200)
...@@ -249,9 +251,8 @@ def stats(): ...@@ -249,9 +251,8 @@ def stats():
return render_template( return render_template(
'stats.html', 'stats.html',
user=current_user, user=current_user,
table_result=temp_rslt.to_html(classes=[ table_result=temp_rslt.to_html(
'table table-bordered table-hover table-striped display' classes=['table table-bordered table-hover table-striped display']),
]),
graphe=graph, graphe=graph,
ids=graph['ids']) ids=graph['ids'])
......
...@@ -4,7 +4,6 @@ from __future__ import absolute_import, division, print_function ...@@ -4,7 +4,6 @@ from __future__ import absolute_import, division, print_function
import pip import pip
from setuptools import find_packages, setup from setuptools import find_packages, setup
session = pip.download.PipSession() session = pip.download.PipSession()
_install_requires = pip.req.parse_requirements( _install_requires = pip.req.parse_requirements(
'requirements.txt', session=session) 'requirements.txt', session=session)
......
...@@ -213,13 +213,15 @@ def test_execution_query1(): ...@@ -213,13 +213,15 @@ def test_execution_query1():
def test_execution_query3(): def test_execution_query3():
df = pd.DataFrame({'Continent': ['America', 'Europe'], df = pd.DataFrame({
'Amount': [768, 255]} 'Continent': ['America', 'Europe'],
).groupby(['Continent']).sum() 'Amount': [768, 255]
}).groupby(['Continent']).sum()
executer.mdx_query = query12 executer.mdx_query = query12
assert assert_frame_equal(df, executer.execute_mdx()['result']) is None assert assert_frame_equal(df, executer.execute_mdx()['result']) is None
executer.mdx_query = query11 executer.mdx_query = query11
assert list(executer.execute_mdx()['result']['Amount']) == [1023, 1023, 1023, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512] assert list(executer.execute_mdx()['result'][
'Amount']) == [1023, 1023, 1023, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
...@@ -9,6 +9,7 @@ from spyne import Application ...@@ -9,6 +9,7 @@ from spyne import Application
from spyne.protocol.soap import Soap11 from spyne.protocol.soap import Soap11
from spyne.server.wsgi import WsgiApplication from spyne.server.wsgi import WsgiApplication
from werkzeug.serving import make_server from werkzeug.serving import make_server
from olapy.core.services.xmla import XmlaProviderService from olapy.core.services.xmla import XmlaProviderService
from tests.xs0_responses import TEST_QUERY_AXIS0 from tests.xs0_responses import TEST_QUERY_AXIS0
...@@ -18,6 +19,7 @@ RUNNING_TOX = 'RUNTING_TOX' in os.environ ...@@ -18,6 +19,7 @@ RUNNING_TOX = 'RUNTING_TOX' in os.environ
class Member(object): class Member(object):
def __init__(self, **kwargs): def __init__(self, **kwargs):
self.__dict__.update(kwargs) self.__dict__.update(kwargs)
...@@ -42,8 +44,7 @@ class WSGIServer: ...@@ -42,8 +44,7 @@ class WSGIServer:
Copy/pasted from pytest_localserver w/ slight changes. Copy/pasted from pytest_localserver w/ slight changes.
""" """
def __init__(self, host='127.0.0.1', port=8000, application=None, def __init__(self, host='127.0.0.1', port=8000, application=None, **kwargs):
**kwargs):
self._server = make_server(host, port, application, **kwargs) self._server = make_server(host, port, application, **kwargs)
self.server_address = self._server.server_address self.server_address = self._server.server_address
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment