vanth/tests/api/test_user.py

16 lines
353 B
Python
Raw Normal View History

2016-05-03 18:28:56 -07:00
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']