def test_get_topics(self): """Test the get_topics() method.""" en_us = DocumentFactory(topics=TopicFactory.create_batch(2)) eq_(2, len(en_us.get_topics())) # Localized document inherits parent's topics. DocumentFactory(parent=en_us) eq_(2, len(en_us.get_topics()))