Add API for creating new users

This commit is contained in:
Eli Ribble 2016-05-03 19:28:56 -06:00
parent c84288eaac
commit 69228f21ca
5 changed files with 76 additions and 3 deletions

15
tests/api/test_user.py Normal file
View 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']