Merge branch 'develop' into feature/opaqueid
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#from __future__ import print_function
|
||||
|
||||
from statements import *
|
||||
nu = datetime.datetime.now()
|
||||
|
||||
@@ -10,6 +9,7 @@ tested = [
|
||||
]
|
||||
|
||||
#@pytest.mark.django_db
|
||||
@override_settings(TESTING=True)
|
||||
class URLTests(TestCase):
|
||||
def setUp(self):
|
||||
redis_connection.publish('tasks','KILL')
|
||||
@@ -100,8 +100,8 @@ class URLTests(TestCase):
|
||||
'/rowers/histo/user/1/',
|
||||
'/rowers/histo/user/1/2016-01-01/2016-12-31/',
|
||||
'/rowers/histodata/',
|
||||
'/rowers/job-kill/1/',
|
||||
'/rowers/jobs-status/',
|
||||
# '/rowers/job-kill/1/',
|
||||
# '/rowers/jobs-status/',
|
||||
'/rowers/laboratory/',
|
||||
'/rowers/laboratory/user/1/',
|
||||
'/rowers/legal/',
|
||||
@@ -169,8 +169,8 @@ class URLTests(TestCase):
|
||||
'/rowers/team-compare-select/',
|
||||
'/rowers/team-compare-select/workout/'+encoded1+'/',
|
||||
'/rowers/team-compare-select/2016-01-01/2016-12-31/',
|
||||
'/rowers/test-job/2/',
|
||||
'/rowers/test-job2/2/',
|
||||
# '/rowers/test-job/2/',
|
||||
# '/rowers/test-job2/2/',
|
||||
# '/rowers/test_callback/',
|
||||
# '/rowers/updatefitness/',
|
||||
# '/rowers/updatefitness/rower/',
|
||||
@@ -218,7 +218,7 @@ class URLTests(TestCase):
|
||||
'/rowers/workout/'+encoded1+'/split/',
|
||||
'/rowers/workout/'+encoded1+'/stats/',
|
||||
'/rowers/workout/'+encoded1+'/stream/',
|
||||
'/rowers/workout/'+encoded1+'/task/',
|
||||
# '/rowers/workout/'+encoded1+'/task/',
|
||||
'/rowers/workout/'+encoded1+'/teststrokedata/',
|
||||
'/rowers/workout/'+encoded1+'/toggle-ranking/',
|
||||
'/rowers/workout/'+encoded1+'/undosmoothenpace/',
|
||||
@@ -263,10 +263,11 @@ class URLTests(TestCase):
|
||||
self.assertTrue(login)
|
||||
response = self.c.get(url,follow=True)
|
||||
if response.status_code != expected:
|
||||
print url
|
||||
print response.status_code
|
||||
print(url )
|
||||
print(response.status_code)
|
||||
|
||||
self.assertEqual(response.status_code,
|
||||
expected)
|
||||
expected)
|
||||
|
||||
html = BeautifulSoup(response.content,'html.parser')
|
||||
urls = [a['href'] for a in html.find_all('a')]
|
||||
@@ -275,10 +276,10 @@ class URLTests(TestCase):
|
||||
if u not in tested and 'rowers' in u and 'http' not in u and 'authorize' not in u and 'import' not in u and 'logout' not in u:
|
||||
response = self.c.get(u)
|
||||
if response.status_code not in [200,302]:
|
||||
print len(tested)
|
||||
print url
|
||||
print u
|
||||
print response.status_code
|
||||
print(len(tested))
|
||||
print(url)
|
||||
print(u)
|
||||
print(response.status_code)
|
||||
tested.append(u)
|
||||
self.assertIn(response.status_code,
|
||||
[200,302])
|
||||
|
||||
Reference in New Issue
Block a user