def test_on_save_searchable_name(self): k = KennelDataModel(self.kennel_id, name=self.name, acronym=self.acronym) new_name = 'Cheese' k.name = new_name k.save() k.refresh() self.assertEqual(k.searchable_name, k.searchable_value(new_name))
def test_on_save_searchable_acronym(self): k = KennelDataModel(self.kennel_id, name=self.name, acronym=self.acronym) new_acronym = 'CKH3' k.acronym = new_acronym k.save() k.refresh() self.assertEqual(k.searchable_acronym, k.searchable_value(new_acronym))
def test_update_searchable_acronym(self): k = KennelDataModel(self.kennel_id, name=self.name, acronym=self.acronym) k.save() new_acronym = 'CHEH3' k.add_update_action('acronym', 'set', new_acronym) k.update() k.refresh() self.assertEqual(k.searchable_acronym, k.searchable_value(new_acronym))
def test_update_searchable_name(self): k = KennelDataModel(self.kennel_id, name=self.name, acronym=self.acronym) k.save() new_name = 'Cheese' k.add_update_action('name', 'set', new_name) k.update() k.refresh() self.assertEqual(k.searchable_name, k.searchable_value(new_name))
def test_on_init_searchable_acronym(self): k = KennelDataModel(self.kennel_id, name=self.name, acronym=self.acronym) self.assertEqual(k.searchable_acronym, k.searchable_value(k.acronym))