예제 #1
0
 def test_index_node_contains_correct_author_group(self):
     for slot, authors in zip(self.top_slots, self.authors):
         index_node = create_index_node_for_slot(slot)
         self.assertIn('authorGroup', index_node)
         author_group = index_node['authorGroup']
         for user in authors:
             self.assertIn(create_user_info(user), author_group)
예제 #2
0
 def test_index_node_contains_correct_index(self):
     for slot, index in zip(self.top_slots, [1, 1, 3]):
         index_node = create_index_node_for_slot(slot)
         self.assertIn('index', index_node)
         self.assertEqual(index_node['index'], index)
예제 #3
0
 def test_index_node_contains_correct_short_title(self):
     for slot, short_title in zip(self.top_slots, self.short_titles):
         index_node = create_index_node_for_slot(slot)
         self.assertIn('shortTitle', index_node)
         self.assertEqual(index_node['shortTitle'], short_title)
예제 #4
0
 def test_index_node_contains_correct_full_title(self):
     for slot, full_title in zip(self.top_slots, self.full_titles):
         index_node = create_index_node_for_slot(slot)
         self.assertIn('fullTitle', index_node)
         self.assertEqual(index_node['fullTitle'], full_title)
예제 #5
0
 def test_index_node_validates(self):
     for slot in self.top_slots:
         index_node = create_index_node_for_slot(slot)
         self.assertTrue(validators['indexNode'].validate(index_node))