示例#1
0
 def update_store_by_id(self, store_id, store):
     if store['manager_id'] in self.list_id:
         if store_id in self._object:
             self._object[store_id] = store
         else:
             raise NoSuchStoreError(store_id)
     else:
         raise NoSuchManagerError(store['manager_id'])
 def update_store_by_id(self, store_id, store):
     if store_id in self._stores:
         self._stores[store_id] = store
     else:
         raise NoSuchStoreError(store_id)
 def get_store_by_id(self, store_id):
     try:
         return self._stores[store_id]
     except KeyError:
         raise NoSuchStoreError(store_id)
示例#4
0
 def remove_store_by_id(self, store_id):
     if store_id in self._stores:
         self._stores.pop(store_id)
     else:
         raise NoSuchStoreError(store_id)
示例#5
0
 def get_store_by_id(self, store_id):
     # import pdb;pdb.set_trace()
     try:
         return self._stores[store_id]
     except KeyError:
         raise NoSuchStoreError(store_id)