Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Testing if it is possible to iterate over queryset
Browse files Browse the repository at this point in the history
  • Loading branch information
Sascha Häusler committed Sep 26, 2014
1 parent abfb84e commit e8d0a29
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions arangodb/tests.py
Expand Up @@ -519,6 +519,27 @@ class TestModel(CollectionModel):

TestModel.destroy()

def test_iterate_over_queryset(self):

class TestModel(CollectionModel):
pass

TestModel.init()

model1 = TestModel()
model1.save()

model2 = TestModel()
model2.save()

all_models = TestModel.objects.all()

for model in all_models:
self.assertTrue(isinstance(model, TestModel))

TestModel.destroy()



class CollectionModelForeignKeyFieldTestCase(unittest.TestCase):
def setUp(self):
Expand Down

0 comments on commit e8d0a29

Please sign in to comment.