Exemplo n.º 1
0
    def test_delete_router_not_in_store(self):
        """Removing a non-existing router should not result in an error"""
        config = self.create_router_config()
        router = Router(self.api, config)
        self.assertEqual((yield self.api.router_store.get_router_list()), [])

        yield router.delete()
        self.assertEqual((yield self.api.router_store.get_router_list()), [])
Exemplo n.º 2
0
    def test_delete_router_not_in_store(self):
        """Removing a non-existing router should not result in an error"""
        config = self.create_router_config()
        router = Router(self.api, config)
        self.assertEqual((yield self.api.router_store.get_router_list()), [])

        yield router.delete()
        self.assertEqual((yield self.api.router_store.get_router_list()), [])
Exemplo n.º 3
0
    def test_delete_router(self):
        """Removes the router config from the store"""
        config = self.create_router_config()
        router = Router(self.api, config)
        yield router.save()
        self.assertEqual((yield self.api.router_store.get_router_list()),
                         [router.router_config['id']])

        yield router.delete()
        self.assertEqual((yield self.api.router_store.get_router_list()), [])
Exemplo n.º 4
0
    def test_delete_router(self):
        """Removes the router config from the store"""
        config = self.create_router_config()
        router = Router(self.api, config)
        yield router.save()
        self.assertEqual(
            (yield self.api.router_store.get_router_list()),
            [router.router_config['id']])

        yield router.delete()
        self.assertEqual((yield self.api.router_store.get_router_list()), [])