def test_extrinsic_metadata(self):
        """Various format front matter."""

        qs = FBO(
            path=TEST_FILES_ROOT,
            glob='*.rst',
            metadata=FileObject.MetadataInFileHead,
        ).all()

        self.assertEqual(
            3,
            qs.count(),
        )
        # Have to test this both ways so that however it
        # comes out of the filesystem "by default" (ie
        # intrinsically, probably inode ordering) we'll get
        # a failure if our explicit ordering isn't applied.
        self.assertEqual(
            'test1.rst',
            qs.order_by('title')[0].name,
        )
        self.assertEqual(
            'test3.rst',
            qs.order_by('-title')[0].name,
        )
    def test_intrinsic_metadata(self):
        """Intrinsic metadata."""

        qs = FBO(
            path=TEST_FILES_ROOT,
            glob='*.md',
            metadata='.meta',
        ).all()

        self.assertEqual(
            4,
            qs.count(),
        )
        # Have to test this both ways so that however it
        # comes out of the filesystem "by default" (ie
        # intrinsically, probably inode ordering) we'll get
        # a failure if our explicit ordering isn't applied.
        self.assertEqual(
            'index.md',
            qs.order_by('name')[0].name,
        )
        self.assertEqual(
            'test2.md',
            qs.order_by('-name')[0].name,
        )