Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Semantic Router
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
aurelio-labs
Semantic Router
Commits
db941f01
Unverified
Commit
db941f01
authored
1 year ago
by
Siraj R Aizlewood
Browse files
Options
Downloads
Patches
Plain Diff
Fixing PyTests
RouteLayer.remove() renamed to delete().
parent
43faa0e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/unit/test_layer.py
+9
-9
9 additions, 9 deletions
tests/unit/test_layer.py
with
9 additions
and
9 deletions
tests/unit/test_layer.py
+
9
−
9
View file @
db941f01
...
...
@@ -174,24 +174,24 @@ class TestRouteLayer:
route
.
name
for
route
in
routes
},
"
The list of route names should match the names of the routes added.
"
def
test_
remov
e_route
(
self
,
openai_encoder
,
routes
):
def
test_
delet
e_route
(
self
,
openai_encoder
,
routes
):
route_layer
=
RouteLayer
(
encoder
=
openai_encoder
,
routes
=
routes
)
#
Remov
e a route by name
route_to_
remov
e
=
routes
[
0
].
name
route_layer
.
remov
e
(
route_to_
remov
e
)
#
Delet
e a route by name
route_to_
delet
e
=
routes
[
0
].
name
route_layer
.
delet
e
(
route_to_
delet
e
)
# Ensure the route is no longer in the route layer
assert
(
route_to_
remov
e
not
in
route_layer
.
list_route_names
()
),
"
The route should be
remov
ed from the route layer.
"
route_to_
delet
e
not
in
route_layer
.
list_route_names
()
),
"
The route should be
delet
ed from the route layer.
"
# Ensure the route is no longer in the index or categories
assert
(
route_to_
remov
e
not
in
route_layer
.
categories
),
"
The route should be
remov
ed from the categories.
"
route_to_
delet
e
not
in
route_layer
.
categories
),
"
The route should be
delet
ed from the categories.
"
# Ensure the route's utterances are no longer in the index
for
utterance
in
routes
[
0
].
utterances
:
assert
(
utterance
not
in
route_layer
.
index
),
"
The route
'
s utterances should be
remov
ed from the index.
"
),
"
The route
'
s utterances should be
delet
ed from the index.
"
def
test_remove_route_not_found
(
self
,
openai_encoder
,
routes
):
route_layer
=
RouteLayer
(
encoder
=
openai_encoder
,
routes
=
routes
)
...
...
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