예제 #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))
예제 #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))
예제 #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'])
예제 #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'])
예제 #5
0
 def test_count_nextid(self):
     self.assertEqual(
         self.pivot,
         character.select_count(self.user1,
                                ratings.GENERAL.code,
                                nextid=self.pivotid))
예제 #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))
예제 #7
0
 def test_count_nextid(self):
     self.assertEqual(
         self.pivot,
         character.select_count(self.user1, ratings.GENERAL.code, nextid=self.pivotid))
예제 #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))