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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
coding-at-fu
sams-classes
Commits
0e6a257b
There was a problem fetching the pipeline summary.
Commit
0e6a257b
authored
8 years ago
by
slobinger
Browse files
Options
Downloads
Plain Diff
Merge branch '29-alias-for-apps' into 'master'
Resolve "Apps sollen mit Alias an Hub angemeldet werden können" Closes
#29
See merge request
!20
parents
9461376b
a0d39e81
No related branches found
No related tags found
1 merge request
!20
Resolve "Apps sollen mit Alias an Hub angemeldet werden können"
Pipeline
#
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
debian/changelog
+6
-0
6 additions, 0 deletions
debian/changelog
sams_classes/sams_hub.py
+2
-2
2 additions, 2 deletions
sams_classes/sams_hub.py
sams_classes/version.py
+1
-1
1 addition, 1 deletion
sams_classes/version.py
test/test_sams_hub.py
+7
-5
7 additions, 5 deletions
test/test_sams_hub.py
with
16 additions
and
8 deletions
debian/changelog
+
6
−
0
View file @
0e6a257b
python3-sams-classes (1.0.3~1) UNRELEASED; urgency=medium
* fixed issue #29 "Apps sollen mit Alias an Hub angemeldet werden können"
-- Lobinger <slobinger@justus.zib.de> Thu, 22 Jun 2017 08:43:01 +0200
python3-sams-classes (1.0.2) unstable; urgency=medium
python3-sams-classes (1.0.2) unstable; urgency=medium
* fixed issue #27 "Proxy muss alle HTTP-Methoden unterstützen"
* fixed issue #27 "Proxy muss alle HTTP-Methoden unterstützen"
...
...
This diff is collapsed.
Click to expand it.
sams_classes/sams_hub.py
+
2
−
2
View file @
0e6a257b
...
@@ -30,7 +30,7 @@ class SAMSHub:
...
@@ -30,7 +30,7 @@ class SAMSHub:
self
.
_flaskApp
.
context_processor
(
self
.
_context_processor
)
self
.
_flaskApp
.
context_processor
(
self
.
_context_processor
)
self
.
_flaskApp
.
secret_key
=
'
my awesome SAMSHub secret_key
'
self
.
_flaskApp
.
secret_key
=
'
my awesome SAMSHub secret_key
'
def
addApp
(
self
,
app
:
SAMSApp
=
None
):
def
addApp
(
self
,
app
:
SAMSApp
=
None
,
alias
=
None
):
if
not
isinstance
(
app
,
SAMSApp
):
if
not
isinstance
(
app
,
SAMSApp
):
raise
TypeError
(
'
Argument app has to be a SAMSApp.
'
)
raise
TypeError
(
'
Argument app has to be a SAMSApp.
'
)
self
.
_apps
[
app
.
name
]
=
app
self
.
_apps
[
app
.
name
]
=
app
...
@@ -38,7 +38,7 @@ class SAMSHub:
...
@@ -38,7 +38,7 @@ class SAMSHub:
if
app
.
name
==
self
.
_config
.
get
(
'
main_app
'
):
if
app
.
name
==
self
.
_config
.
get
(
'
main_app
'
):
self
.
_flaskApp
.
register_blueprint
(
app
.
blueprint
)
self
.
_flaskApp
.
register_blueprint
(
app
.
blueprint
)
self
.
_flaskApp
.
register_blueprint
(
self
.
_flaskApp
.
register_blueprint
(
app
.
blueprint
,
url_prefix
=
'
/
'
+
app
.
name
)
app
.
blueprint
,
url_prefix
=
'
/
'
+
(
alias
or
app
.
name
)
)
@property
@property
def
appKeys
(
self
):
def
appKeys
(
self
):
...
...
This diff is collapsed.
Click to expand it.
sams_classes/version.py
+
1
−
1
View file @
0e6a257b
__version__
=
'
1.0.2
'
__version__
=
'
1.0.3
'
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test/test_sams_hub.py
+
7
−
5
View file @
0e6a257b
...
@@ -33,12 +33,14 @@ class CaseSAMSHubWithThreadedAPI(unittest.TestCase):
...
@@ -33,12 +33,14 @@ class CaseSAMSHubWithThreadedAPI(unittest.TestCase):
self
.
hub
.
addApp
(
self
.
hub
.
addApp
(
SAMSApp
(
name
=
'
test
'
,
manifest
=
manifest
,
langDict
=
{
'
de
'
:{}})
SAMSApp
(
name
=
'
test
'
,
manifest
=
manifest
,
langDict
=
{
'
de
'
:{}})
)
)
self
.
hub
.
addApp
(
testApp
=
SAMSApp
(
name
=
'
test.app
'
,
manifest
=
manifest
,
langDict
=
{
'
de
'
:{}})
SAMSApp
(
name
=
'
test
.app
'
,
manifest
=
manifest
,
langDict
=
{
'
de
'
:{}}
)
self
.
hub
.
addApp
(
app
=
test
App
)
)
self
.
hub
.
addApp
(
app
=
testApp
,
alias
=
'
test
'
)
with
self
.
hub
.
flaskApp
.
test_client
()
as
client
:
with
self
.
hub
.
flaskApp
.
test_client
()
as
client
:
self
.
assertIs
(
client
.
get
(
path
=
'
/api/hello
'
).
status_code
,
200
)
for
urlPrefix
in
(
''
,
'
/test.app
'
,
'
/test
'
):
self
.
assertIs
(
client
.
get
(
path
=
'
/test.app/api/hello
'
).
status_code
,
200
)
with
self
.
subTest
(
urlPrefix
):
self
.
assertIs
(
client
.
get
(
path
=
urlPrefix
+
'
/api/hello
'
).
status_code
,
200
)
class
CaseSAMSHubWithMainApp
(
unittest
.
TestCase
):
class
CaseSAMSHubWithMainApp
(
unittest
.
TestCase
):
...
...
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