~matsubara/charmworld/make-check-fail

« back to all changes in this revision

Viewing changes to charmworld/tests/test_search.py

  • Committer: Tarmac
  • Author(s): Aaron Bentley
  • Date: 2013-05-03 19:18:31 UTC
  • mfrom: (224.1.3 cleanups)
  • Revision ID: tarmac-20130503191831-gakpeoiswzf96y8w
[r=abentley][bug=][author=abentley] Cleanups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
473
473
        temp_client = self.use_index_client()
474
474
        update(temp_client)
475
475
 
476
 
    def get_mapping(self):
477
 
        return self.index_client._client.get_mapping(
478
 
            self.index_client.index_name, 'charm')['charm']
479
 
 
480
476
    def test_compatible_update(self):
481
477
        index_client = self.use_index_client(put_mapping=False)
482
478
        put_mapping(index_client, {
483
479
            'box': {'type': 'string', 'index': 'not_analyzed'}
484
480
        })
485
 
        mapping = self.get_mapping()
 
481
        mapping = index_client.get_mapping()['charm']
486
482
        self.assertNotIn('name', mapping['properties'])
487
483
        update(index_client)
488
 
        mapping = self.get_mapping()
 
484
        mapping = index_client.get_mapping()['charm']
489
485
        self.assertIn('box', mapping['properties'])
490
486
        self.assertIn('name', mapping['properties'])
491
487
 
497
493
            }
498
494
        )
499
495
        update(index_client)
500
 
        mapping = self.get_mapping()
 
496
        mapping = index_client.get_mapping()['charm']
501
497
        self.assertEqual('not_analyzed',
502
498
                         mapping['properties']['name']['index'])
503
499