def test_update_moves_dataset(self):
        manifestation = _manifestation()
        application = Application(
            name=u'postgres',
            image=DockerImage.from_string(u'postgres'),
            volume=AttachedVolume(
                manifestation=manifestation,
                mountpoint=FilePath(b"/var/lib/postgresql/9.4/data/base")
            )
        )

        deployment = Deployment(
            nodes={
                Node(
                    uuid=self.NODE_A_UUID,
                    manifestations={manifestation.dataset_id:
                                    manifestation},
                    applications=[application]
                ),
                Node(uuid=self.NODE_B_UUID),
            },
        )

        d = self.persistence_service.save(deployment)

        d.addCallback(lambda _: self.assertResponseCode(
            b"POST", b"/configuration/containers/postgres",
            {u"node_uuid": self.NODE_B}, OK
        ))

        def updated(_):
            deployment = self.persistence_service.get()
            expected = Deployment(
                nodes={
                    Node(uuid=self.NODE_A_UUID),
                    Node(
                        uuid=self.NODE_B_UUID,
                        manifestations={manifestation.dataset_id:
                                        manifestation},
                        applications=[application]
                    ),
                }
            )
            self.assertEqual(deployment, expected)

        d.addCallback(updated)
        return d
Like add_task but will call the function as a coroutine, allowing you
dataset/ETHPy150Open ClusterHQ/flocker/flocker/control/test/test_httpapi.py/UpdateContainerConfigurationTestsMixin.test_update_moves_dataset--crossover with--dataset/ETHPy150Open JeremyOT/Toto/toto/tasks.py/TaskQueue.yield_task