Answer the question
In order to leave comments, you need to log in
Error with ujson(ValueError: Expected object or value) What's wrong?
@pytest.mark.django_db()
def test_ajax_update_balance(self, client):
client, user, useradd = create_test_user_and_force_login(client)
response = client.post('/ajax-update-balance', {
'balance': '1001',
})
assert response.status_code == 301
resp = ujson.loads(response.content)
assert resp['success']
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question