8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c78f381 commit 178f6fcCopy full SHA for 178f6fc
section4/video_code/tests/system/user_test.py
@@ -14,6 +14,17 @@ def test_register_user(self):
14
self.assertDictEqual(d1={'message': 'User created successfully.'},
15
d2=json.loads(r.data))
16
17
+ def test_register_and_login(self):
18
+ with self.app() as c:
19
+ with self.app_context():
20
+ c.post('/register', data={'username': 'test', 'password': '1234'})
21
+ auth_request = c.post('/auth', data=json.dumps({
22
+ 'username': 'test',
23
+ 'password': '1234'
24
+ }), headers={'Content-Type': 'application/json'})
25
+
26
+ self.assertIn('access_token', json.loads(auth_request.data).keys())
27
28
def test_register_duplicate_user(self):
29
with self.app() as c:
30
with self.app_context():
0 commit comments