Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
brian-dashboard-manager
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
geant-swd
brian
brian-dashboard-manager
Commits
d15f252a
Commit
d15f252a
authored
1 month ago
by
Bjarke Madsen
Browse files
Options
Downloads
Patches
Plain Diff
test ignored_folders
parent
9923a1ed
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/grafana/test_dashboard.py
+6
-2
6 additions, 2 deletions
test/grafana/test_dashboard.py
with
6 additions
and
2 deletions
test/grafana/test_dashboard.py
+
6
−
2
View file @
d15f252a
...
@@ -11,19 +11,23 @@ from brian_dashboard_manager.grafana.request import TokenRequest
...
@@ -11,19 +11,23 @@ from brian_dashboard_manager.grafana.request import TokenRequest
@responses.activate
@responses.activate
def
test_list_all_dashboards
(
mock_grafana
):
def
test_list_all_dashboards
(
mock_grafana
,
data_config
):
mock_grafana
.
create_folder
({
"
uid
"
:
"
some-folder
"
})
mock_grafana
.
create_folder
({
"
uid
"
:
"
some-folder
"
})
mock_grafana
.
create_dashboard
(
mock_grafana
.
create_dashboard
(
{
"
uid
"
:
"
1
"
,
"
title
"
:
"
some dashboard
"
,
"
folderUid
"
:
"
some-folder
"
}
{
"
uid
"
:
"
1
"
,
"
title
"
:
"
some dashboard
"
,
"
folderUid
"
:
"
some-folder
"
}
)
)
mock_grafana
.
create_dashboard
({
"
uid
"
:
"
2
"
,
"
title
"
:
"
other dashboard
"
})
mock_grafana
.
create_dashboard
({
"
uid
"
:
"
2
"
,
"
title
"
:
"
other dashboard
"
})
mock_grafana
.
create_folder
({
"
uid
"
:
"
1337
"
,
"
title
"
:
"
fakefolder
"
})
mock_grafana
.
create_dashboard
({
"
uid
"
:
"
4
"
,
"
title
"
:
"
fake dashboard
"
,
"
folderUid
"
:
"
1337
"
})
request
=
mock_grafana
.
request
request
=
mock_grafana
.
request
data
=
list_all_dashboards
(
request
)
data
,
ignored_folders
=
list_all_dashboards
(
request
,
data_config
)
assert
len
(
data
)
==
2
assert
len
(
data
)
==
2
assert
data
[
"
some-folder
"
][
"
some dashboard
"
][
"
uid
"
]
==
"
1
"
assert
data
[
"
some-folder
"
][
"
some dashboard
"
][
"
uid
"
]
==
"
1
"
assert
data
[
""
][
"
other dashboard
"
][
"
uid
"
]
==
"
2
"
assert
data
[
""
][
"
other dashboard
"
][
"
uid
"
]
==
"
2
"
assert
"
1337
"
not
in
data
assert
"
1337
"
in
ignored_folders
@responses.activate
@responses.activate
...
...
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