Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sams-classes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
coding-at-fu
sams-classes
Commits
e2d015a6
Commit
e2d015a6
authored
Jun 2, 2017
by
Sebastian Lobinger
Browse files
Options
Downloads
Patches
Plain Diff
add test_app_menu_external_urls to test_sams_app.py see issue
#15
parent
877eb550
No related branches found
No related tags found
1 merge request
!9
Resolve "externe urls ermöglichen"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_sams_app.py
+15
-0
15 additions, 0 deletions
test/test_sams_app.py
with
15 additions
and
0 deletions
test/test_sams_app.py
+
15
−
0
View file @
e2d015a6
...
@@ -156,6 +156,21 @@ class TestSAMSApp(unittest.TestCase):
...
@@ -156,6 +156,21 @@ class TestSAMSApp(unittest.TestCase):
self
.
assertEqual
(
menu
[
0
][
'
url
'
],
'
/test
'
)
self
.
assertEqual
(
menu
[
0
][
'
url
'
],
'
/test
'
)
self
.
assertEqual
(
menu
[
1
][
'
url
'
],
'
/test/1
'
)
self
.
assertEqual
(
menu
[
1
][
'
url
'
],
'
/test/1
'
)
def
test_app_menu_external_urls
(
self
):
"""
app.menu(lanCode, prefix) ignors external urls for prefix
"""
manifest
=
{
'
default_language
'
:
'
en
'
,
'
menu
'
:
[
{
'
url
'
:
''
,
'
name_string
'
:
'
0
'
},
{
'
url
'
:
'
http://zib.de
'
,
'
name_string
'
:
'
1
'
,
'
external
'
:
True
}
]
}
langDict
=
{
'
0
'
:
'
main
'
,
'
1
'
:
'
second
'
}
app
=
SAMSApp
(
name
=
'
test
'
,
manifest
=
manifest
,
langDict
=
{
'
en
'
:
langDict
})
menu
=
app
.
menu
(
langCode
=
'
en
'
,
urlPrefix
=
'
/test
'
)
self
.
assertEqual
(
menu
[
0
][
'
url
'
],
'
/test
'
)
self
.
assertEqual
(
menu
[
1
][
'
url
'
],
'
http://zib.de
'
)
def
test_app_proxies_list
(
self
):
def
test_app_proxies_list
(
self
):
"""
app.proxies provides list even if no proxy is defined in manifest
"""
"""
app.proxies provides list even if no proxy is defined in manifest
"""
app
=
SAMSApp
(
name
=
'
test
'
,
manifest
=
{
'
default_language
'
:
'
de
'
},
app
=
SAMSApp
(
name
=
'
test
'
,
manifest
=
{
'
default_language
'
:
'
de
'
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment