Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing custom_indexes testing

Signed-off-by: Wayne Witzel III <wwitzel3@gmail.com>
  • Loading branch information...
commit 935fa7952e3b17530847c57f0a857aeb8b69ab0b 1 parent 6ac2386
@wwitzel3 wwitzel3 authored Rick Copeland committed
View
3  .gitignore
@@ -3,6 +3,7 @@
*-py2.6.egg
*.log
*.pyc
+*.swp
*/.coverage
.coverage
/cover/
@@ -14,4 +15,4 @@ download/*
install/*
build/*
dist/*
-docs/_build/*
+docs/_build/*
View
2  ming/metadata.py
@@ -108,7 +108,7 @@ def _process_collection_args(args, kwargs):
if a.sparse:
indexes.append(Index(a.name, unique=True, sparse=True))
else:
- indexes.append(Index(a.name, unique=True))
+ indexes.append(Index(a.name, unique=True, sparse=False))
elif a.sparse:
indexes.append(Index(a.name, unique=False, sparse=True))
elif a.index:
View
3  ming/tests/test_declarative.py
@@ -199,6 +199,8 @@ class __mongometa__:
self.MyDoc.__mongometa__.indexes)
self.assertEqual(MyChild.__mongometa__.unique_indexes,
self.MyDoc.__mongometa__.unique_indexes)
+ self.assertEqual(MyChild.__mongometa__.custom_indexes,
+ self.MyDoc.__mongometa__.custom_indexes)
def test_index_inheritance_both(self):
class MyChild(self.MyDoc):
@@ -209,6 +211,7 @@ class __mongometa__:
unique_indexes = [
('test4',),
]
+ custom_indexes = []
class MyGrandChild(MyChild):
class __mongometa__:
indexes = [
Please sign in to comment.
Something went wrong with that request. Please try again.