Revision f611ef3d test/kkconfig.py
b/test/kkconfig.py | ||
---|---|---|
13 | 13 |
|
14 | 14 |
from commissioning.clients.http import HTTP_API_Client |
15 | 15 |
from commissioning import QuotaholderAPI |
16 |
import random |
|
16 | 17 |
|
17 | 18 |
### DEFS ### |
18 | 19 |
def new_quota_holder_client(): |
... | ... | |
25 | 26 |
global QH_URL |
26 | 27 |
return QuotaholderHTTP(QH_URL) |
27 | 28 |
|
29 |
def rand_string(): |
|
30 |
alphabet = 'abcdefghijklmnopqrstuvwxyz' |
|
31 |
min = 5 |
|
32 |
max = 15 |
|
33 |
string='' |
|
34 |
for x in random.sample(alphabet,random.randint(min,max)): |
|
35 |
string += x |
|
36 |
return string |
|
37 |
|
|
28 | 38 |
### CLASSES ### |
29 | 39 |
class QHTestCase(unittest.TestCase): |
30 | 40 |
def setUp(self): |
Also available in: Unified diff