Skip to content

Commit 200ba0b

Browse files
committed
Tests: Use more robust method for random postfix
1 parent 664e849 commit 200ba0b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎stream/tests.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import requests
1515
from stream import serializer
1616
from requests.exceptions import MissingSchema
17+
from itertools import count
1718

1819
try:
1920
from urlparse import urlparse, parse_qs
@@ -43,8 +44,13 @@ def connect_debug():
4344

4445
client = connect_debug()
4546

47+
counter = count()
48+
test_timestamp = int(time.time())
49+
50+
4651
def get_random_postfix():
47-
return str(int(time.time())) + str(random.randint(0, 1000))
52+
return 'test_%s-feed_%s' % (test_timestamp, next(counter))
53+
4854

4955
def getfeed(feed_slug, user_id):
5056
'''

0 commit comments

Comments
 (0)