summaryrefslogtreecommitdiff
path: root/src/mango/test/01-index-crud-test.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mango/test/01-index-crud-test.py')
-rw-r--r--src/mango/test/01-index-crud-test.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mango/test/01-index-crud-test.py b/src/mango/test/01-index-crud-test.py
index b60239992..13ae300dd 100644
--- a/src/mango/test/01-index-crud-test.py
+++ b/src/mango/test/01-index-crud-test.py
@@ -113,6 +113,21 @@ class IndexCrudTests(mango.DbPerClass):
return
raise AssertionError("index not created")
+ def test_ignore_design_docs(self):
+ fields = ["baz", "foo"]
+ ret = self.db.create_index(fields, name="idx_02")
+ assert ret is True
+ self.db.save_doc({
+ "_id": "_design/ignore",
+ "views": {
+ "view1": {
+ "map": "function (doc) { emit(doc._id, 1)}"
+ }
+ }
+ })
+ indexes = self.db.list_indexes()
+ self.assertEqual(len(indexes), 2)
+
def test_read_idx_doc(self):
self.db.create_index(["foo", "bar"], name="idx_01")
self.db.create_index(["hello", "bar"])