Skip to content

Commit

Permalink
Fix oppia#2394: Add docstrings to gae_models.py (oppia#2633)
Browse files Browse the repository at this point in the history
* Update gae_models.py

* Update gae_models.py

* Update gae_models.py and fixed calling get_all with include_dleted parameter

* Update gae_models.py

* Update gae_models.py
  • Loading branch information
vojtechjelinek authored and seanlip committed Nov 1, 2016
1 parent 5a88f7a commit 7135c94
Show file tree
Hide file tree
Showing 4 changed files with 232 additions and 52 deletions.
8 changes: 4 additions & 4 deletions core/domain/collection_services_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,13 @@ def test_soft_deletion_of_collections(self):
self.assertIn(self.COLLECTION_ID, [
collection.id
for collection in collection_models.CollectionModel.get_all(
include_deleted_entities=True)])
include_deleted=True)])

# The collection summary is deleted, however.
self.assertNotIn(self.COLLECTION_ID, [
collection.id
for collection in collection_models.CollectionSummaryModel.get_all(
include_deleted_entities=True)])
include_deleted=True)])

def test_hard_deletion_of_collections(self):
"""Test that hard deletion of collections works correctly."""
Expand All @@ -553,7 +553,7 @@ def test_hard_deletion_of_collections(self):
self.assertNotIn(self.COLLECTION_ID, [
collection.id
for collection in collection_models.CollectionModel.get_all(
include_deleted_entities=True)])
include_deleted=True)])

def test_summaries_of_hard_deleted_collections(self):
"""Test that summaries of hard deleted collections are
Expand All @@ -574,7 +574,7 @@ def test_summaries_of_hard_deleted_collections(self):
self.assertNotIn(self.COLLECTION_ID, [
collection.id
for collection in collection_models.CollectionSummaryModel.get_all(
include_deleted_entities=True)])
include_deleted=True)])

def test_collections_are_removed_from_index_when_deleted(self):
"""Tests that deleted collections are removed from the search index."""
Expand Down
8 changes: 4 additions & 4 deletions core/domain/exp_services_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,14 @@ def test_soft_deletion_of_explorations(self):
self.assertIn(
self.EXP_ID,
[exp.id for exp in exp_models.ExplorationModel.get_all(
include_deleted_entities=True)]
include_deleted=True)]
)

# The exploration summary is deleted however
self.assertNotIn(
self.EXP_ID,
[exp.id for exp in exp_models.ExpSummaryModel.get_all(
include_deleted_entities=True)]
include_deleted=True)]
)

def test_hard_deletion_of_explorations(self):
Expand All @@ -406,7 +406,7 @@ def test_hard_deletion_of_explorations(self):
self.assertNotIn(
self.EXP_ID,
[exp.id for exp in exp_models.ExplorationModel.get_all(
include_deleted_entities=True)]
include_deleted=True)]
)

def test_summaries_of_hard_deleted_explorations(self):
Expand All @@ -427,7 +427,7 @@ def test_summaries_of_hard_deleted_explorations(self):
self.assertNotIn(
self.EXP_ID,
[exp.id for exp in exp_models.ExpSummaryModel.get_all(
include_deleted_entities=True)]
include_deleted=True)]
)

def test_explorations_are_removed_from_index_when_deleted(self):
Expand Down
Loading

0 comments on commit 7135c94

Please sign in to comment.