blob: 390f250c10da42e9a7f1dde32ef7435a1841bda7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env python
server = 'http://localhost:3000'
import requests
import json
import string
import random
def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for x in range(size))
params = {
'login': 'python_test_user_'+id_generator(),
'A': '12345',
}
r = requests.post(server + '/sessions', data = params)
print r.url
print r.text
|