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
52d74c50
Commit
52d74c50
authored
4 years ago
by
Bjarke Madsen
Browse files
Options
Downloads
Patches
Plain Diff
remove unused files
parent
7daf5ba2
No related branches found
Branches containing commit
Tags
0.24
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
brian_dashboard_manager/routes/test.py
+0
-19
0 additions, 19 deletions
brian_dashboard_manager/routes/test.py
test/test_routes.py
+0
-46
0 additions, 46 deletions
test/test_routes.py
with
0 additions
and
65 deletions
brian_dashboard_manager/routes/test.py
deleted
100644 → 0
+
0
−
19
View file @
7daf5ba2
from
flask
import
Blueprint
,
jsonify
,
current_app
from
brian_dashboard_manager.routes
import
common
from
brian_dashboard_manager
import
CONFIG_KEY
routes
=
Blueprint
(
"
api-test
"
,
__name__
)
@routes.after_request
def
after_request
(
resp
):
return
common
.
after_request
(
resp
)
@routes.route
(
"
/test1
"
,
methods
=
[
'
GET
'
,
'
POST
'
])
@common.require_accepts_json
def
test1
():
return
jsonify
({
'
config
'
:
current_app
.
config
[
CONFIG_KEY
],
'
success
'
:
True
})
This diff is collapsed.
Click to expand it.
test/test_routes.py
deleted
100644 → 0
+
0
−
46
View file @
7daf5ba2
import
json
import
jsonschema
DEFAULT_REQUEST_HEADERS
=
{
'
Content-type
'
:
'
application/json
'
,
'
Accept
'
:
[
'
application/json
'
]
}
def
test_version_request
(
client
):
version_schema
=
{
'
$schema
'
:
'
http://json-schema.org/draft-07/schema#
'
,
'
type
'
:
'
object
'
,
'
properties
'
:
{
'
api
'
:
{
'
type
'
:
'
string
'
,
'
pattern
'
:
r
'
\d+\.\d+
'
},
'
module
'
:
{
'
type
'
:
'
string
'
,
'
pattern
'
:
r
'
\d+\.\d+
'
}
},
'
required
'
:
[
'
api
'
,
'
module
'
],
'
additionalProperties
'
:
False
}
rv
=
client
.
post
(
'
version
'
,
headers
=
DEFAULT_REQUEST_HEADERS
)
assert
rv
.
status_code
==
200
jsonschema
.
validate
(
json
.
loads
(
rv
.
data
.
decode
(
'
utf-8
'
)),
version_schema
)
def
test_test_proc1
(
client
):
rv
=
client
.
post
(
'
test/test1
'
,
headers
=
DEFAULT_REQUEST_HEADERS
)
assert
rv
.
status_code
==
200
result
=
json
.
loads
(
rv
.
data
.
decode
(
'
utf-8
'
))
assert
result
# boilerplate test ...
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