Skip to content

Commit

Permalink
Merge 96a1a46 into b0ed183
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglas Paz committed Sep 11, 2018
2 parents b0ed183 + 96a1a46 commit 4de043d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bothub/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def votes_sum(self):
@property
def intents(self):
return list(set(self.examples(
exclude_deleted=False).exclude(
exclude_deleted=True).exclude(
intent='').values_list(
'intent',
flat=True)))
Expand Down
8 changes: 7 additions & 1 deletion bothub/common/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def test_intents(self):
'greet',
self.repository.intents)

RepositoryExample.objects.create(
example = RepositoryExample.objects.create(
repository_update=self.repository.current_update(
languages.LANGUAGE_PT),
text='tchau',
Expand All @@ -305,6 +305,12 @@ def test_intents(self):
'bye',
self.repository.intents)

example.delete()

self.assertNotIn(
'bye',
self.repository.intents)

def test_entities(self):
example = RepositoryExample.objects.create(
repository_update=self.repository.current_update(
Expand Down

0 comments on commit 4de043d

Please sign in to comment.