added tests #416
348 tests run, 337 passed, 0 skipped, 11 failed.
Annotations
Check failure on line 1 in TestAddPortForwardForm
github-actions / JUnit Test Report
TestAddPortForwardForm.test_bad_ip[1.1]
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
Raw output
self = <tests.test_forms.TestAddPortForwardForm object at 0x7f56a849fa50>
ip = '1.1'
validate_ip = <function TestAddPortForwardForm.validate_ip.<locals>.validate_ip at 0x7f56a7f48680>
@pytest.mark.parametrize(
"ip",
[
"1.1",
"0z:80:41:ae:fd:7e",
"0+:80:41:ae:fd:7e",
"awda ssfsfwa",
"a",
"ab",
"1000",
"1.6.7."
],
)
def test_bad_ip(self, ip, validate_ip):
with pytest.raises(ValidationError):
> validate_ip(ip)
tests/test_forms.py:143:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_forms.py:121: in validate_ip
form = forms.AddPortForwardForm(data={
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:208: in __call__
return type.__call__(cls, *args, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:73: in __init__
super().__init__(formdata=formdata, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:280: in __init__
super().__init__(self._unbound_fields, meta=meta_obj, prefix=prefix)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:39: in __init__
translations = self.meta.get_translations(self)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:67: in get_translations
if not current_app.config.get("WTF_I18N_ENABLED", True):
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:316: in __get__
obj = instance._get_current_object()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def _get_current_object() -> T:
try:
obj = local.get() # type: ignore[union-attr]
except LookupError:
> raise RuntimeError(unbound_message) from None
E RuntimeError: Working outside of application context.
E
E This typically means that you attempted to use functionality that needed
E the current application. To solve this, set up an application context
E with app.app_context(). See the documentation for more information.
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:513: RuntimeError
Check failure on line 1 in TestAddPortForwardForm
github-actions / JUnit Test Report
TestAddPortForwardForm.test_bad_ip[0z:80:41:ae:fd:7e]
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
Raw output
self = <tests.test_forms.TestAddPortForwardForm object at 0x7f56a849fc50>
ip = '0z:80:41:ae:fd:7e'
validate_ip = <function TestAddPortForwardForm.validate_ip.<locals>.validate_ip at 0x7f56a7f48680>
@pytest.mark.parametrize(
"ip",
[
"1.1",
"0z:80:41:ae:fd:7e",
"0+:80:41:ae:fd:7e",
"awda ssfsfwa",
"a",
"ab",
"1000",
"1.6.7."
],
)
def test_bad_ip(self, ip, validate_ip):
with pytest.raises(ValidationError):
> validate_ip(ip)
tests/test_forms.py:143:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_forms.py:121: in validate_ip
form = forms.AddPortForwardForm(data={
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:208: in __call__
return type.__call__(cls, *args, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:73: in __init__
super().__init__(formdata=formdata, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:280: in __init__
super().__init__(self._unbound_fields, meta=meta_obj, prefix=prefix)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:39: in __init__
translations = self.meta.get_translations(self)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:67: in get_translations
if not current_app.config.get("WTF_I18N_ENABLED", True):
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:316: in __get__
obj = instance._get_current_object()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def _get_current_object() -> T:
try:
obj = local.get() # type: ignore[union-attr]
except LookupError:
> raise RuntimeError(unbound_message) from None
E RuntimeError: Working outside of application context.
E
E This typically means that you attempted to use functionality that needed
E the current application. To solve this, set up an application context
E with app.app_context(). See the documentation for more information.
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:513: RuntimeError
Check failure on line 1 in TestAddPortForwardForm
github-actions / JUnit Test Report
TestAddPortForwardForm.test_bad_ip[0+:80:41:ae:fd:7e]
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
Raw output
self = <tests.test_forms.TestAddPortForwardForm object at 0x7f56a849fed0>
ip = '0+:80:41:ae:fd:7e'
validate_ip = <function TestAddPortForwardForm.validate_ip.<locals>.validate_ip at 0x7f56a7f48680>
@pytest.mark.parametrize(
"ip",
[
"1.1",
"0z:80:41:ae:fd:7e",
"0+:80:41:ae:fd:7e",
"awda ssfsfwa",
"a",
"ab",
"1000",
"1.6.7."
],
)
def test_bad_ip(self, ip, validate_ip):
with pytest.raises(ValidationError):
> validate_ip(ip)
tests/test_forms.py:143:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_forms.py:121: in validate_ip
form = forms.AddPortForwardForm(data={
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:208: in __call__
return type.__call__(cls, *args, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:73: in __init__
super().__init__(formdata=formdata, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:280: in __init__
super().__init__(self._unbound_fields, meta=meta_obj, prefix=prefix)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:39: in __init__
translations = self.meta.get_translations(self)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:67: in get_translations
if not current_app.config.get("WTF_I18N_ENABLED", True):
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:316: in __get__
obj = instance._get_current_object()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def _get_current_object() -> T:
try:
obj = local.get() # type: ignore[union-attr]
except LookupError:
> raise RuntimeError(unbound_message) from None
E RuntimeError: Working outside of application context.
E
E This typically means that you attempted to use functionality that needed
E the current application. To solve this, set up an application context
E with app.app_context(). See the documentation for more information.
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:513: RuntimeError
Check failure on line 1 in TestAddPortForwardForm
github-actions / JUnit Test Report
TestAddPortForwardForm.test_bad_ip[awda ssfsfwa]
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
Raw output
self = <tests.test_forms.TestAddPortForwardForm object at 0x7f56a8478350>
ip = 'awda ssfsfwa'
validate_ip = <function TestAddPortForwardForm.validate_ip.<locals>.validate_ip at 0x7f56a7f48680>
@pytest.mark.parametrize(
"ip",
[
"1.1",
"0z:80:41:ae:fd:7e",
"0+:80:41:ae:fd:7e",
"awda ssfsfwa",
"a",
"ab",
"1000",
"1.6.7."
],
)
def test_bad_ip(self, ip, validate_ip):
with pytest.raises(ValidationError):
> validate_ip(ip)
tests/test_forms.py:143:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_forms.py:121: in validate_ip
form = forms.AddPortForwardForm(data={
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:208: in __call__
return type.__call__(cls, *args, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:73: in __init__
super().__init__(formdata=formdata, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:280: in __init__
super().__init__(self._unbound_fields, meta=meta_obj, prefix=prefix)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:39: in __init__
translations = self.meta.get_translations(self)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:67: in get_translations
if not current_app.config.get("WTF_I18N_ENABLED", True):
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:316: in __get__
obj = instance._get_current_object()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def _get_current_object() -> T:
try:
obj = local.get() # type: ignore[union-attr]
except LookupError:
> raise RuntimeError(unbound_message) from None
E RuntimeError: Working outside of application context.
E
E This typically means that you attempted to use functionality that needed
E the current application. To solve this, set up an application context
E with app.app_context(). See the documentation for more information.
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:513: RuntimeError
Check failure on line 1 in TestAddPortForwardForm
github-actions / JUnit Test Report
TestAddPortForwardForm.test_bad_ip[a]
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
Raw output
self = <tests.test_forms.TestAddPortForwardForm object at 0x7f56a84786d0>
ip = 'a'
validate_ip = <function TestAddPortForwardForm.validate_ip.<locals>.validate_ip at 0x7f56a7f48680>
@pytest.mark.parametrize(
"ip",
[
"1.1",
"0z:80:41:ae:fd:7e",
"0+:80:41:ae:fd:7e",
"awda ssfsfwa",
"a",
"ab",
"1000",
"1.6.7."
],
)
def test_bad_ip(self, ip, validate_ip):
with pytest.raises(ValidationError):
> validate_ip(ip)
tests/test_forms.py:143:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_forms.py:121: in validate_ip
form = forms.AddPortForwardForm(data={
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:208: in __call__
return type.__call__(cls, *args, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:73: in __init__
super().__init__(formdata=formdata, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:280: in __init__
super().__init__(self._unbound_fields, meta=meta_obj, prefix=prefix)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:39: in __init__
translations = self.meta.get_translations(self)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:67: in get_translations
if not current_app.config.get("WTF_I18N_ENABLED", True):
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:316: in __get__
obj = instance._get_current_object()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def _get_current_object() -> T:
try:
obj = local.get() # type: ignore[union-attr]
except LookupError:
> raise RuntimeError(unbound_message) from None
E RuntimeError: Working outside of application context.
E
E This typically means that you attempted to use functionality that needed
E the current application. To solve this, set up an application context
E with app.app_context(). See the documentation for more information.
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:513: RuntimeError
Check failure on line 1 in TestAddPortForwardForm
github-actions / JUnit Test Report
TestAddPortForwardForm.test_bad_ip[ab]
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
Raw output
self = <tests.test_forms.TestAddPortForwardForm object at 0x7f56a8478a50>
ip = 'ab'
validate_ip = <function TestAddPortForwardForm.validate_ip.<locals>.validate_ip at 0x7f56a7f48680>
@pytest.mark.parametrize(
"ip",
[
"1.1",
"0z:80:41:ae:fd:7e",
"0+:80:41:ae:fd:7e",
"awda ssfsfwa",
"a",
"ab",
"1000",
"1.6.7."
],
)
def test_bad_ip(self, ip, validate_ip):
with pytest.raises(ValidationError):
> validate_ip(ip)
tests/test_forms.py:143:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_forms.py:121: in validate_ip
form = forms.AddPortForwardForm(data={
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:208: in __call__
return type.__call__(cls, *args, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:73: in __init__
super().__init__(formdata=formdata, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:280: in __init__
super().__init__(self._unbound_fields, meta=meta_obj, prefix=prefix)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:39: in __init__
translations = self.meta.get_translations(self)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:67: in get_translations
if not current_app.config.get("WTF_I18N_ENABLED", True):
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:316: in __get__
obj = instance._get_current_object()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def _get_current_object() -> T:
try:
obj = local.get() # type: ignore[union-attr]
except LookupError:
> raise RuntimeError(unbound_message) from None
E RuntimeError: Working outside of application context.
E
E This typically means that you attempted to use functionality that needed
E the current application. To solve this, set up an application context
E with app.app_context(). See the documentation for more information.
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:513: RuntimeError
Check failure on line 1 in TestAddPortForwardForm
github-actions / JUnit Test Report
TestAddPortForwardForm.test_bad_ip[1000]
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
Raw output
self = <tests.test_forms.TestAddPortForwardForm object at 0x7f56a8478d90>
ip = '1000'
validate_ip = <function TestAddPortForwardForm.validate_ip.<locals>.validate_ip at 0x7f56a7f48680>
@pytest.mark.parametrize(
"ip",
[
"1.1",
"0z:80:41:ae:fd:7e",
"0+:80:41:ae:fd:7e",
"awda ssfsfwa",
"a",
"ab",
"1000",
"1.6.7."
],
)
def test_bad_ip(self, ip, validate_ip):
with pytest.raises(ValidationError):
> validate_ip(ip)
tests/test_forms.py:143:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_forms.py:121: in validate_ip
form = forms.AddPortForwardForm(data={
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:208: in __call__
return type.__call__(cls, *args, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:73: in __init__
super().__init__(formdata=formdata, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:280: in __init__
super().__init__(self._unbound_fields, meta=meta_obj, prefix=prefix)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:39: in __init__
translations = self.meta.get_translations(self)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:67: in get_translations
if not current_app.config.get("WTF_I18N_ENABLED", True):
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:316: in __get__
obj = instance._get_current_object()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def _get_current_object() -> T:
try:
obj = local.get() # type: ignore[union-attr]
except LookupError:
> raise RuntimeError(unbound_message) from None
E RuntimeError: Working outside of application context.
E
E This typically means that you attempted to use functionality that needed
E the current application. To solve this, set up an application context
E with app.app_context(). See the documentation for more information.
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:513: RuntimeError
Check failure on line 1 in TestAddPortForwardForm
github-actions / JUnit Test Report
TestAddPortForwardForm.test_bad_ip[1.6.7.]
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
Raw output
self = <tests.test_forms.TestAddPortForwardForm object at 0x7f56a84790d0>
ip = '1.6.7.'
validate_ip = <function TestAddPortForwardForm.validate_ip.<locals>.validate_ip at 0x7f56a7f48680>
@pytest.mark.parametrize(
"ip",
[
"1.1",
"0z:80:41:ae:fd:7e",
"0+:80:41:ae:fd:7e",
"awda ssfsfwa",
"a",
"ab",
"1000",
"1.6.7."
],
)
def test_bad_ip(self, ip, validate_ip):
with pytest.raises(ValidationError):
> validate_ip(ip)
tests/test_forms.py:143:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_forms.py:121: in validate_ip
form = forms.AddPortForwardForm(data={
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:208: in __call__
return type.__call__(cls, *args, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:73: in __init__
super().__init__(formdata=formdata, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:280: in __init__
super().__init__(self._unbound_fields, meta=meta_obj, prefix=prefix)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/wtforms/form.py:39: in __init__
translations = self.meta.get_translations(self)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_wtf/form.py:67: in get_translations
if not current_app.config.get("WTF_I18N_ENABLED", True):
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:316: in __get__
obj = instance._get_current_object()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def _get_current_object() -> T:
try:
obj = local.get() # type: ignore[union-attr]
except LookupError:
> raise RuntimeError(unbound_message) from None
E RuntimeError: Working outside of application context.
E
E This typically means that you attempted to use functionality that needed
E the current application. To solve this, set up an application context
E with app.app_context(). See the documentation for more information.
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/local.py:513: RuntimeError
Check failure on line 111 in tests/blueprints/usersuite/test_usersuite.py
github-actions / JUnit Test Report
test_usersuite.test_port_forward
assert 200 == 404
+ where 200 = <WrapperTestResponse streamed [200 OK]>.status_code
Raw output
client = <TestClient <Flask 'sipa'>>
def test_port_forward(client):
rv = client.get("usersuite/show-port-forwardings?show=True")
assert rv.status_code == 200
assert "source port" in rv.data.decode("UTF-8")
assert "destination port" in rv.data.decode("UTF-8")
rv = client.get("usersuite/show-port-forwardings")
> assert rv.status_code == 404
E assert 200 == 404
E + where 200 = <WrapperTestResponse streamed [200 OK]>.status_code
tests/blueprints/usersuite/test_usersuite.py:111: AssertionError
Check failure on line 115 in tests/blueprints/usersuite/test_usersuite.py
github-actions / JUnit Test Report
test_usersuite.test_wrong_forwad_index
assert 200 == 404
+ where 200 = <WrapperTestResponse streamed [200 OK]>.status_code
Raw output
client = <TestClient <Flask 'sipa'>>
def test_wrong_forwad_index(client):
rv = client.get("usersuite/get_row/-1")
> assert rv.status_code == 404
E assert 200 == 404
E + where 200 = <WrapperTestResponse streamed [200 OK]>.status_code
tests/blueprints/usersuite/test_usersuite.py:115: AssertionError
Check failure on line 119 in tests/blueprints/usersuite/test_usersuite.py
github-actions / JUnit Test Report
test_usersuite.test_add_port_forward
jinja2.exceptions.UndefinedError: 'port_forwarding' is undefined
Raw output
client = <TestClient <Flask 'sipa'>>
def test_add_port_forward(client):
data = {}
> rv = client.post("usersuite/add-port-forward")
tests/blueprints/usersuite/test_usersuite.py:119:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/test.py:1146: in post
return self.open(*args, **kw)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask/testing.py:238: in open
response = super().open(
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/test.py:1095: in open
response = self.run_wsgi_app(request.environ, buffered=buffered)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/test.py:962: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/test.py:1243: in run_wsgi_app
app_rv = app(environ, start_response)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask/app.py:2552: in __call__
return self.wsgi_app(environ, start_response)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/werkzeug/middleware/proxy_fix.py:187: in __call__
return self.app(environ, start_response)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask/app.py:2532: in wsgi_app
response = self.handle_exception(e)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask/app.py:2529: in wsgi_app
response = self.full_dispatch_request()
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask/app.py:1825: in full_dispatch_request
rv = self.handle_user_exception(e)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask/app.py:1823: in full_dispatch_request
rv = self.dispatch_request()
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask/app.py:1799: in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask_login/utils.py:290: in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
sipa/blueprints/usersuite.py:696: in add_port_forwarding
return render_template("usersuite/_get_port_row.html", form=AddPortForwardForm())
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask/templating.py:147: in render_template
return _render(app, template, context)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/flask/templating.py:130: in _render
rv = template.render(context)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/jinja2/environment.py:1301: in render
self.environment.handle_exception()
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/jinja2/environment.py:936: in handle_exception
raise rewrite_traceback_stack(source=source)
sipa/templates/usersuite/_get_port_row.html:42: in top-level template code
<label>{{ port_forwarding[0] }}</label>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <flask.templating.Environment object at 0x7f56a5d80210>, obj = Undefined
argument = 0
def getitem(
self, obj: t.Any, argument: t.Union[str, t.Any]
) -> t.Union[t.Any, Undefined]:
"""Get an item or attribute of an object but prefer the item."""
try:
> return obj[argument]
E jinja2.exceptions.UndefinedError: 'port_forwarding' is undefined
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/jinja2/environment.py:466: UndefinedError