Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Commit

Permalink
Add test for vocabularies with special names
Browse files Browse the repository at this point in the history
  • Loading branch information
George Schneeloch committed Oct 21, 2015
1 parent 080c4a0 commit f0b36f4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions rest/tests/test_search.py
Expand Up @@ -674,3 +674,22 @@ def test_name_collision(self):
)])['count'],
0
)

def test_vocabulary_with_special_name(self):
"""
Make sure that vocabularies that can collide with elasticsearch indexes
won't break anything.
"""
special_names = (
'run',
'resource_type',
'course',
'text',
'description_path',
)
for name in special_names:
vocab_dict = dict(self.DEFAULT_VOCAB_DICT)
vocab_dict['name'] = name
self.create_vocabulary(self.repo.slug, vocab_dict)
# This checks for a 200 status code.
self.get_results()

0 comments on commit f0b36f4

Please sign in to comment.