Add API for creating new users
This commit is contained in:
parent
c84288eaac
commit
69228f21ca
5 changed files with 76 additions and 3 deletions
15
tests/api/test_user.py
Normal file
15
tests/api/test_user.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('db')
|
||||
def test_post(client):
|
||||
data = {
|
||||
'name' : 'Blue Stahli',
|
||||
'password' : 'metamorphosis',
|
||||
'username' : 'BlueStahli',
|
||||
}
|
||||
response = client.post('/user/', data=json.dumps(data))
|
||||
assert response.status_code == 204
|
||||
assert response.headers['Location']
|
Loading…
Add table
Add a link
Reference in a new issue