Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
095074b0
Commit
095074b0
authored
1 month ago
by
Mohammad Torkashvand
Browse files
Options
Downloads
Patches
Plain Diff
opengear_subscription_factory to return object instead of str
parent
70c75d8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!348
Feature/nat 936 refactor fixtures
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/fixtures/opengear_fixtures.py
+3
-3
3 additions, 3 deletions
test/fixtures/opengear_fixtures.py
test/workflows/opengear/test_import_opengear.py
+1
-1
1 addition, 1 deletion
test/workflows/opengear/test_import_opengear.py
with
4 additions
and
4 deletions
test/fixtures/opengear_fixtures.py
+
3
−
3
View file @
095074b0
import
pytest
from
orchestrator.db
import
db
from
orchestrator.domain
import
SubscriptionModel
from
orchestrator.types
import
SubscriptionLifecycle
,
UUIDstr
from
orchestrator.types
import
SubscriptionLifecycle
from
gso.products
import
ProductName
from
gso.products.product_types.opengear
import
ImportedOpengearInactive
,
OpengearInactive
...
...
@@ -23,7 +23,7 @@ def opengear_subscription_factory(site_subscription_factory, faker, geant_partne
partner
:
dict
|
None
=
None
,
*
,
is_imported
:
bool
|
None
=
False
,
)
->
UUIDstr
:
)
->
SubscriptionModel
:
if
partner
is
None
:
partner
=
geant_partner
...
...
@@ -63,6 +63,6 @@ def opengear_subscription_factory(site_subscription_factory, faker, geant_partne
opengear_subscription
.
save
()
db
.
session
.
commit
()
return
str
(
opengear_subscription
.
subscription_id
)
return
opengear_subscription
return
subscription_create
This diff is collapsed.
Click to expand it.
test/workflows/opengear/test_import_opengear.py
+
1
−
1
View file @
095074b0
...
...
@@ -8,7 +8,7 @@ from test.workflows import assert_complete, run_workflow
@pytest.mark.workflow
()
def
test_import_office_router_success
(
opengear_subscription_factory
):
imported_opengear
=
opengear_subscription_factory
(
is_imported
=
True
)
imported_opengear
=
str
(
opengear_subscription_factory
(
is_imported
=
True
)
.
subscription_id
)
result
,
_
,
_
=
run_workflow
(
"
import_opengear
"
,
[{
"
subscription_id
"
:
imported_opengear
}])
subscription
=
Opengear
.
from_subscription
(
imported_opengear
)
...
...
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