Ejemplo n.º 1
0
 def test_cannot_see_non_friends_character(self):
     """
     Should not be able to see a non-friend's friends-ony character in a listing.
     """
     db_utils.create_character(self.user2, settings=CharSettings({"friends-only"}, {}, {}))
     self.assertEqual(
         self.count,
         character.select_count(self.user1, ratings.GENERAL.code))
Ejemplo n.º 2
0
 def test_cannot_see_non_friends_character(self):
     """
     Should not be able to see a non-friend's friends-ony character in a listing.
     """
     db_utils.create_character(self.user2, settings=CharSettings({"friends-only"}, {}, {}))
     self.assertEqual(
         self.count,
         character.select_count(self.user1, ratings.GENERAL.code))
Ejemplo n.º 3
0
 def test_see_friends_character(self):
     """
     Should be able to see a friend's friends-only character in a listing.
     """
     c = db_utils.create_character(self.friend1, settings=CharSettings({"friends-only"}, {}, {}))
     self.assertEqual(
         self.count + 1,
         character.select_count(self.user1, ratings.GENERAL.code))
     self.assertEqual(
         c,
         character.select_list(self.user1, ratings.GENERAL.code, 100)[0]['charid'])
Ejemplo n.º 4
0
 def test_see_friends_character(self):
     """
     Should be able to see a friend's friends-only character in a listing.
     """
     c = db_utils.create_character(self.friend1, settings=CharSettings({"friends-only"}, {}, {}))
     self.assertEqual(
         self.count + 1,
         character.select_count(self.user1, ratings.GENERAL.code))
     self.assertEqual(
         c,
         character.select_list(self.user1, ratings.GENERAL.code, 100)[0]['charid'])
Ejemplo n.º 5
0
 def test_count_nextid(self):
     self.assertEqual(
         self.pivot,
         character.select_count(self.user1,
                                ratings.GENERAL.code,
                                nextid=self.pivotid))
Ejemplo n.º 6
0
 def test_count_backid(self):
     self.assertEqual(
         self.count - self.pivot - 1,
         character.select_count(self.user1,
                                ratings.GENERAL.code,
                                backid=self.pivotid))
Ejemplo n.º 7
0
 def test_count_nextid(self):
     self.assertEqual(
         self.pivot,
         character.select_count(self.user1, ratings.GENERAL.code, nextid=self.pivotid))
Ejemplo n.º 8
0
 def test_count_backid(self):
     self.assertEqual(
         self.count - self.pivot - 1,
         character.select_count(self.user1, ratings.GENERAL.code, backid=self.pivotid))