def test_basic_path(self):
     kw = get_keywords_from_path(
         settings.ROOT_USERVOLUME_PATH +
         '/is/the path/path! for/my%$files/here.txt')
     # result should not include base directory and should be sorted
     self.assertEqual(
         list(sorted(kw)),
         sorted(['files', 'for', 'is', 'here', 'path', 'the', 'txt', 'my']))
 def test_documents_path(self):
     kw = get_keywords_from_path(
         '~/Documents/is/the path/path! for/my%$files/here.txt')
     # result should include documents and should be sorted
     self.assertEqual(
         sorted(kw),
         sorted(['documents', 'files', 'for', 'is', 'here', 'path', 'the',
                 'txt', 'my']))
 def test_basic_path(self):
     kw = get_keywords_from_path(
         settings.ROOT_USERVOLUME_PATH +
         '/is/the path/path! for/my%$files/here.txt')
     # result should not include base directory and should be sorted
     self.assertEqual(
         list(sorted(kw)),
         sorted(['files', 'for', 'is', 'here', 'path', 'the', 'txt', 'my']))
 def test_normalized_path(self):
     kw = get_keywords_from_path(
         '~/Do\u0304cuments/is/the path/path!'
         ' fo\u0304r/my%$files/hero\u0304.txt')
     # unicode character should be normalized
     self.assertEqual(
         sorted(kw),
         sorted(['documents', 'files', 'for', 'is', 'hero', 'path', 'the',
                 'txt', 'my']))
 def test_normalized_path(self):
     kw = get_keywords_from_path('~/Do\u0304cuments/is/the path/path!'
                                 ' fo\u0304r/my%$files/hero\u0304.txt')
     # unicode character should be normalized
     self.assertEqual(
         sorted(kw),
         sorted([
             'documents', 'files', 'for', 'is', 'hero', 'path', 'the',
             'txt', 'my'
         ]))
 def test_documents_path(self):
     kw = get_keywords_from_path(
         '~/Documents/is/the path/path! for/my%$files/here.txt')
     # result should include documents and should be sorted
     self.assertEqual(
         sorted(kw),
         sorted([
             'documents', 'files', 'for', 'is', 'here', 'path', 'the',
             'txt', 'my'
         ]))