Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
ee4c04f5
Commit
ee4c04f5
authored
3 years ago
by
Mario Raciti
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-556
: Fix parameters for auth token retrieval in t_websocket_service test
parent
02006cbb
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!822
Resolve TMSS-556
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/backend/services/websocket/test/t_websocket_service.py
+3
-2
3 additions, 2 deletions
...SS/backend/services/websocket/test/t_websocket_service.py
with
3 additions
and
2 deletions
SAS/TMSS/backend/services/websocket/test/t_websocket_service.py
+
3
−
2
View file @
ee4c04f5
...
...
@@ -25,7 +25,6 @@ logger = logging.getLogger('lofar.' + __name__)
logging
.
basicConfig
(
format
=
'
%(asctime)s %(levelname)s %(message)s
'
,
level
=
logging
.
INFO
)
from
lofar.sas.tmss.test.test_environment
import
TMSSTestEnvironment
from
lofar.sas.tmss.test.tmss_test_environment_unittest_setup
import
AUTH
,
BASE_URL
from
lofar.messaging.messagebus
import
TemporaryExchange
,
BusListenerJanitor
from
lofar.sas.tmss.services.websocket_service
import
create_service
,
TMSSEventMessageHandlerForWebsocket
,
DEFAULT_WEBSOCKET_PORT
...
...
@@ -68,7 +67,9 @@ class TestSubtaskSchedulingService(unittest.TestCase):
def
on_open
(
ws
):
logger
.
info
(
'
Connected to ws
'
)
# Send auth token as first message after the WS handshake
response
=
requests
.
post
(
BASE_URL
+
'
/token-auth/
'
,
json
=
{
'
username
'
:
AUTH
.
username
,
'
password
'
:
AUTH
.
password
})
response
=
requests
.
post
(
self
.
test_data_creator
.
django_api_url
+
'
/token-auth/
'
,
json
=
{
'
username
'
:
self
.
tmss_test_env
.
client_credentials
.
dbcreds
.
user
,
'
password
'
:
self
.
tmss_test_env
.
client_credentials
.
dbcreds
.
password
})
ws
.
send
(
JSONdumps
(
response
.
json
()))
def
on_close
(
ws
):
...
...
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