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
8f903f41
Commit
8f903f41
authored
1 year ago
by
Hakan Calim
Committed by
Neda Moeini
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
NAT-328: adjusted test for site name validation
parent
9251b4c9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!97
Feature/nat 328 site names should be validated
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/imports/test_imports.py
+6
-1
6 additions, 1 deletion
test/imports/test_imports.py
with
6 additions
and
1 deletion
test/imports/test_imports.py
+
6
−
1
View file @
8f903f41
...
...
@@ -9,6 +9,7 @@ from gso.products.product_blocks.iptrunk import IptrunkType, PhyPortCapacity
from
gso.products.product_blocks.router
import
RouterRole
,
RouterVendor
from
gso.products.product_blocks.site
import
SiteTier
from
gso.utils.helpers
import
iso_from_ipv4
from
gso.api.v1.imports
import
SiteImportModel
SITE_IMPORT_ENDPOINT
=
"
/api/v1/imports/sites
"
ROUTER_IMPORT_ENDPOINT
=
"
/api/v1/imports/routers
"
...
...
@@ -82,7 +83,7 @@ def test_import_iptrunk_successful_with_mocked_process(mock_start_process, test_
@pytest.fixture
def
site_data
(
faker
):
return
{
"
site_name
"
:
faker
.
domain_word
(),
"
site_name
"
:
faker
.
site_name
(),
"
site_city
"
:
faker
.
city
(),
"
site_country
"
:
faker
.
country
(),
"
site_country_code
"
:
faker
.
country_code
(),
...
...
@@ -294,3 +295,7 @@ def test_import_iptrunk_fails_on_side_a_and_b_members_mismatch(
assert
response
.
json
()
==
{
"
detail
"
:
[{
"
loc
"
:
[
"
body
"
,
"
__root__
"
],
"
msg
"
:
"
Mismatch between Side A and B members
"
,
"
type
"
:
"
value_error
"
}]
}
def
test_site_name_is_valid
():
site_model
=
SiteImportModel
(
site_name
=
"
123456
"
)
assert
site_model
is
not
None
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