incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [5/5] git commit: [#5909] Fixed URLs in auth tests
Date Wed, 13 Mar 2013 20:21:14 GMT
Updated Branches:
  refs/heads/master 0e7d7f613 -> ca6d9ea9b


[#5909] Fixed URLs in auth tests

Signed-off-by: Cory Johns <johnsca@geek.net>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ca6d9ea9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ca6d9ea9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ca6d9ea9

Branch: refs/heads/master
Commit: ca6d9ea9b762538b60288e906b2b1506e3b5a01c
Parents: 9d3caf3
Author: Cory Johns <johnsca@geek.net>
Authored: Wed Mar 13 20:07:39 2013 +0000
Committer: Cory Johns <johnsca@geek.net>
Committed: Wed Mar 13 20:20:47 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_auth.py |   58 +++++++++++-----------
 1 files changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ca6d9ea9/Allura/allura/tests/functional/test_auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_auth.py b/Allura/allura/tests/functional/test_auth.py
index 666c3ec..5a45909 100644
--- a/Allura/allura/tests/functional/test_auth.py
+++ b/Allura/allura/tests/functional/test_auth.py
@@ -382,7 +382,7 @@ class TestPreferences(TestController):
         from pytz import country_names
         setsex, setbirthdate, setcountry, setcity, settimezone = \
             ('Male', '19/08/1988', 'IT', 'Milan', 'Europe/Rome')
-        result = self.app.get('/auth/user_info')
+        result = self.app.get('/auth/user_info/')
 
         #Check if personal data is properly set
         r = self.app.post('/auth/user_info/change_personal_data',
@@ -435,7 +435,7 @@ class TestPreferences(TestController):
     def test_contacts(self):
         #Add skype account
         testvalue = 'testaccount'
-        result = self.app.get('/auth/user_info/contacts')
+        result = self.app.get('/auth/user_info/contacts/')
         r = self.app.post('/auth/user_info/contacts/skype_account',
              params=dict(skypeaccount=testvalue))
         user = M.User.query.get(username='test-admin')
@@ -444,7 +444,7 @@ class TestPreferences(TestController):
         #Add social network account
         socialnetwork = 'Facebook'
         accounturl = 'http://www.facebook.com/test'
-        r = self.app.post('/auth/preferences/contacts/add_social_network',
+        r = self.app.post('/auth/user_info/contacts/add_social_network',
              params=dict(socialnetwork=socialnetwork,
                          accounturl = accounturl))
         user = M.User.query.get(username='test-admin')
@@ -455,7 +455,7 @@ class TestPreferences(TestController):
         #Add second social network account
         socialnetwork2 = 'Twitter'
         accounturl2 = 'http://twitter.com/test'
-        r = self.app.post('/auth/preferences/contacts/add_social_network',
+        r = self.app.post('/auth/user_info/contacts/add_social_network',
              params=dict(socialnetwork=socialnetwork2,
                          accounturl = '@test'))
         user = M.User.query.get(username='test-admin')
@@ -464,7 +464,7 @@ class TestPreferences(TestController):
                 {'socialnetwork':socialnetwork2, 'accounturl':accounturl2} in user.socialnetworks)
 
         #Remove first social network account
-        r = self.app.post('/auth/preferences/contacts/remove_social_network',
+        r = self.app.post('/auth/user_info/contacts/remove_social_network',
              params=dict(socialnetwork=socialnetwork,
                          account = accounturl))
         user = M.User.query.get(username='test-admin')
@@ -472,7 +472,7 @@ class TestPreferences(TestController):
                {'socialnetwork':socialnetwork2, 'accounturl':accounturl2} in user.socialnetworks
 
         #Add invalid social network account
-        r = self.app.post('/auth/preferences/contacts/add_social_network',
+        r = self.app.post('/auth/user_info/contacts/add_social_network',
              params=dict(accounturl = accounturl, socialnetwork=''))
         user = M.User.query.get(username='test-admin')
         assert len(user.socialnetworks) == 1 and \
@@ -480,40 +480,40 @@ class TestPreferences(TestController):
 
         #Add telephone number
         telnumber = '+3902123456'
-        r = self.app.post('/auth/preferences/contacts/add_telnumber',
+        r = self.app.post('/auth/user_info/contacts/add_telnumber',
              params=dict(newnumber=telnumber))
         user = M.User.query.get(username='test-admin')
         assert (len(user.telnumbers) == 1 and (user.telnumbers[0] == telnumber))
 
         #Add second telephone number
         telnumber2 = '+3902654321'
-        r = self.app.post('/auth/preferences/contacts/add_telnumber',
+        r = self.app.post('/auth/user_info/contacts/add_telnumber',
              params=dict(newnumber=telnumber2))
         user = M.User.query.get(username='test-admin')
         assert (len(user.telnumbers) == 2 and telnumber in user.telnumbers and telnumber2
in user.telnumbers)
 
         #Remove first telephone number
-        r = self.app.post('/auth/preferences/contacts/remove_telnumber',
+        r = self.app.post('/auth/user_info/contacts/remove_telnumber',
              params=dict(oldvalue=telnumber))
         user = M.User.query.get(username='test-admin')
         assert (len(user.telnumbers) == 1 and telnumber2 in user.telnumbers)
 
         #Add website
         website = 'http://www.testurl.com'
-        r = self.app.post('/auth/preferences/contacts/add_webpage',
+        r = self.app.post('/auth/user_info/contacts/add_webpage',
              params=dict(newwebsite=website))
         user = M.User.query.get(username='test-admin')
         assert (len(user.webpages) == 1 and (website in user.webpages))
 
         #Add second website
         website2 = 'http://www.testurl2.com'
-        r = self.app.post('/auth/preferences/contacts/add_webpage',
+        r = self.app.post('/auth/user_info/contacts/add_webpage',
              params=dict(newwebsite=website2))
         user = M.User.query.get(username='test-admin')
         assert (len(user.webpages) == 2 and website in user.webpages and website2 in user.webpages)
 
         #Remove first website
-        r = self.app.post('/auth/preferences/contacts/remove_webpage',
+        r = self.app.post('/auth/user_info/contacts/remove_webpage',
              params=dict(oldvalue=website))
         user = M.User.query.get(username='test-admin')
         assert (len(user.webpages) == 1 and website2 in user.webpages)
@@ -527,8 +527,8 @@ class TestPreferences(TestController):
         starttime = time(9,0,0)
         endtime = time(12, 0, 0)
 
-        result = self.app.get('/auth/preferences/availability')
-        r = self.app.post('/auth/preferences/availability/add_timeslot',
+        result = self.app.get('/auth/user_info/availability/')
+        r = self.app.post('/auth/user_info/availability/add_timeslot',
              params=dict(
                  weekday=weekday,
                  starttime=starttime.strftime('%H:%M'),
@@ -542,7 +542,7 @@ class TestPreferences(TestController):
         endtime2 = time(16, 0, 0)
 
         #Add second availability timeslot
-        r = self.app.post('/auth/preferences/availability/add_timeslot',
+        r = self.app.post('/auth/user_info/availability/add_timeslot',
              params=dict(
                  weekday=weekday2,
                  starttime=starttime2.strftime('%H:%M'),
@@ -553,7 +553,7 @@ class TestPreferences(TestController):
                and timeslot2dict in user.get_availability_timeslots()
 
         #Remove availability timeslot
-        r = self.app.post('/auth/preferences/availability/remove_timeslot',
+        r = self.app.post('/auth/user_info/availability/remove_timeslot',
              params=dict(
                  weekday=weekday,
                  starttime=starttime.strftime('%H:%M'),
@@ -562,7 +562,7 @@ class TestPreferences(TestController):
         assert len(user.availability) == 1 and timeslot2dict in user.get_availability_timeslots()
 
         #Add invalid availability timeslot
-        r = self.app.post('/auth/preferences/availability/add_timeslot',
+        r = self.app.post('/auth/user_info/availability/add_timeslot',
              params=dict(
                  weekday=weekday2,
                  starttime=endtime2.strftime('%H:%M'),
@@ -581,8 +581,8 @@ class TestPreferences(TestController):
         now = datetime(now.year, now.month, now.day)
         startdate = now + timedelta(days=1)
         enddate = now + timedelta(days=7)
-        result = self.app.get('/auth/preferences/availability')
-        r = self.app.post('/auth/preferences/availability/add_inactive_period',
+        result = self.app.get('/auth/user_info/availability/')
+        r = self.app.post('/auth/user_info/availability/add_inactive_period',
              params=dict(
                  startdate=startdate.strftime('%d/%m/%Y'),
                  enddate=enddate.strftime('%d/%m/%Y')))
@@ -593,7 +593,7 @@ class TestPreferences(TestController):
         #Add second inactivity period
         startdate2 =  now + timedelta(days=24)
         enddate2 = now + timedelta(days=28)
-        r = self.app.post('/auth/preferences/availability/add_inactive_period',
+        r = self.app.post('/auth/user_info/availability/add_inactive_period',
              params=dict(
                  startdate=startdate2.strftime('%d/%m/%Y'),
                  enddate=enddate2.strftime('%d/%m/%Y')))
@@ -603,7 +603,7 @@ class TestPreferences(TestController):
                and period2dict in user.get_inactive_periods()
 
         #Remove first inactivity period
-        r = self.app.post('/auth/preferences/availability/remove_inactive_period',
+        r = self.app.post('/auth/user_info/availability/remove_inactive_period',
              params=dict(
                  startdate=startdate.strftime('%d/%m/%Y'),
                  enddate=enddate.strftime('%d/%m/%Y')))
@@ -611,7 +611,7 @@ class TestPreferences(TestController):
         assert len(user.inactiveperiod) == 1 and period2dict in user.get_inactive_periods()
 
         #Add invalid inactivity period
-        r = self.app.post('/auth/preferences/availability/add_inactive_period',
+        r = self.app.post('/auth/user_info/availability/add_inactive_period',
              params=dict(
                  startdate='NOT/A/DATE',
                  enddate=enddate2.strftime('%d/%m/%Y')))
@@ -627,8 +627,8 @@ class TestPreferences(TestController):
         skill_cat = M.TroveCategory.query.get(show_as_skill=True)
         level = 'low'
         comment = 'test comment'
-        result = self.app.get('/auth/preferences/skills')
-        r = self.app.post('/auth/preferences/skills/save_skill',
+        result = self.app.get('/auth/user_info/skills/')
+        r = self.app.post('/auth/user_info/skills/save_skill',
              params=dict(
                  level=level,
                  comment=comment,
@@ -640,8 +640,8 @@ class TestPreferences(TestController):
         #Add again the same skill
         level = 'medium'
         comment = 'test comment 2'
-        result = self.app.get('/auth/preferences/skills')
-        r = self.app.post('/auth/preferences/skills/save_skill',
+        result = self.app.get('/auth/user_info/skills/')
+        r = self.app.post('/auth/user_info/skills/save_skill',
              params=dict(
                  level=level,
                  comment=comment,
@@ -653,7 +653,7 @@ class TestPreferences(TestController):
         #Add an invalid skill
         level2 = 'not a level'
         comment2 = 'test comment 2'
-        r = self.app.post('/auth/preferences/skills/save_skill',
+        r = self.app.post('/auth/user_info/skills/save_skill',
              params=dict(
                  level=level2,
                  comment=comment2,
@@ -663,8 +663,8 @@ class TestPreferences(TestController):
         assert len(user.skills) == 1 and skilldict in user.skills
 
         #Remove a skill
-        result = self.app.get('/auth/preferences/skills')
-        r = self.app.post('/auth/preferences/skills/remove_skill',
+        result = self.app.get('/auth/user_info/skills/')
+        r = self.app.post('/auth/user_info/skills/remove_skill',
              params=dict(
                  categoryid=str(skill_cat.trove_cat_id)))
         user = M.User.query.get(username='test-admin')


Mime
View raw message