def test_index_document(self):
        content = 'huey is a sweet little kitty'
        doc = self.index.index(content=content)

        # Verify document properties.
        self.assertEqual(doc.get_id(), 1)
        self.assertEqual(doc.content, content)
        self.assertEqual(doc.metadata, {})

        # Verify through relationship properties.
        self.assertEqual(IndexDocument.select().count(), 1)
        idx_doc = IndexDocument.get()
        self.assertEqual(idx_doc._data['document'], doc.get_id())
        self.assertEqual(idx_doc._data['index'], self.index.id)
Basic test case ensuring that content can be indexed and that the
dataset/ETHPy150Open coleifer/scout/tests.py/TestModelAPIs.test_index_document