Ejemplo n.º 1
0
 def test_the_list_entries_contain_whether_the_user_enabled_emailing(self):
     missingCount= 0
     for entry in self.appList:
         app = Application.find(entry['name'])
         mapEntry=AppMap.find(app,self.user)
         if mapEntry:
             self.assertEqual(entry['email_enabled'], mapEntry.can_email)
         else:
             missingCount += 1
     self.assertTrue(missingCount < len(self.appList))
     self.assertTrue(missingCount > 0)
Ejemplo n.º 2
0
 def test_the_list_entries_contain_whether_the_user_enabled_emailing(self):
     missingCount = 0
     for entry in self.appList:
         app = Application.find(entry['name'])
         mapEntry = AppMap.find(app, self.user)
         if mapEntry:
             self.assertEqual(entry['email_enabled'], mapEntry.can_email)
         else:
             missingCount += 1
     self.assertTrue(missingCount < len(self.appList))
     self.assertTrue(missingCount > 0)
Ejemplo n.º 3
0
 def createUserAppMapEntry(self, user, app):
     entry = dict(name=app.name, 
         can_email=app.can_email, 
         hostname=app.redirect_uri.split('/')[2])
     appMapEntry = AppMap.find(app, user)
     if appMapEntry:
         entry['email_enabled'] = appMapEntry.can_email
         entry['username'] = appMapEntry.userid
     else:
         entry['email_enabled'] = None
         entry['username'] = None
     return entry
Ejemplo n.º 4
0
 def createUserAppMapEntry(self, user, app):
     entry = dict(name=app.name,
                  can_email=app.can_email,
                  hostname=app.redirect_uri.split('/')[2])
     appMapEntry = AppMap.find(app, user)
     if appMapEntry:
         entry['email_enabled'] = appMapEntry.can_email
         entry['username'] = appMapEntry.userid
     else:
         entry['email_enabled'] = None
         entry['username'] = None
     return entry
Ejemplo n.º 5
0
 def test_the_list_entries_contain_the_proxy_username(self):
     for entry in self.appList:
         app = Application.find(entry['name'])
         mapEntry=AppMap.find(app,self.user)
         if mapEntry:
             self.assertEqual(entry['username'], mapEntry.userid)
Ejemplo n.º 6
0
 def test_the_list_entries_contain_the_proxy_username(self):
     for entry in self.appList:
         app = Application.find(entry['name'])
         mapEntry = AppMap.find(app, self.user)
         if mapEntry:
             self.assertEqual(entry['username'], mapEntry.userid)