def test_model_get_related_content(self):
        TestSection.load_bulk(BASE_DATA)
        section = TestSection.objects.get(slug='2')
        article = TestArticle(title='B Test Article', section=section)
        article.save()
        content = section.get_related_content()
        self.assertTrue(len(content) == 1)
        item, application, model_name, rel_type = content[0]
        self.assertTrue(item.title == u'B Test Article')
        self.assertTrue(application == 'scaffold')
        self.assertTrue(model_name == 'TestArticle')
        self.assertTrue(rel_type == 'foreign-key')
        for title in ['A Test Article', 'Z Test Article']:
            article = TestArticle(title=title, section=section)
            article.save()
        content = section.get_related_content(sort_fields=['title'])
        self.assertEqual(
            [item[0].title for item in content],
            [u'A Test Article', u'B Test Article', u'Z Test Article']
        )
        # Remove related content, create new content from two models so we
        # can test infer_sort property.
        for item in content:
            item[0].delete()
        for title in ['C', 'Y', 'J']:
            article = SortedTestArticle(title=title, section=section)
            article.save()
        for title in ['A', 'D', 'Z']:
            article = OtherSortedTestArticle(title=title, section=section)
            article.save()
        # Verify that get_related_content shuffles content together in alpha
        # order.
        content = section.get_related_content(infer_sort=True)
        self.assertEqual(
             [item[0].title for item in content],
             [u'A', u'C', u'D', u'J', u'Y', u'Z']
         )
See _get_predict_start for more information. Subclasses do not
dataset/ETHPy150Open mazelife/django-scaffold/scaffold/tests.py/SectionTest.test_model_get_related_content--crossover with--dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/base/tsa_model.py/TimeSeriesModel._get_predict_end