def test_delete_encoded_item(self, fake_app):
     fake_storage = fake_app.storage
     fake_storage_delete = fake_storage.delete
     service = publish_queue.PublishQueueService(backend=MagicMock())
     service.get_from_mongo = MagicMock()
     cursor = UserList([{"_id": "4567", "encoded_item_id": "TEST ID"}])
     cursor.sort = MagicMock()
     cursor.sort.return_value = cursor
     service.get_from_mongo.return_value = cursor
     service.delete({"_id": "4567"})
     assert fake_storage_delete.call_args == mock.call("TEST ID")
Exemplo n.º 2
0
Arquivo: Util.py Projeto: billynip/map
 def sort(self, *args, **kwds):
     self.__make_unique()
     return UserList.sort(self, *args, **kwds)
Exemplo n.º 3
0
 def sort(self, *args, **kwds):
     self.__make_unique()
     return UserList.sort(self, *args, **kwds)
Exemplo n.º 4
0
	def sort(self, *args, **kwds):
		UserList.sort(self, *args, **kwds)
		self._changed()
Exemplo n.º 5
0
 def sort(self, *args):
     UserList.sort(self, *args)
     self.send(sort=1)
Exemplo n.º 6
0
 def sort(self, *args):
     UserList.sort(self, *args)
     self.notify()