示例#1
0
    def test_admin_api_connection(self, client):
        connection = self.mock_connection(client)
        admin_api.connect('', '', '')
        self.assertEqual(admin_api.spanner_admin_api()._connection, connection)

        admin_api.hangup()
        with self.assertRaises(error.SpannerError):
            admin_api.spanner_admin_api()
示例#2
0
 def test_admin_api_create_ddl_connection(self, client):
     connection = self.mock_connection(client)
     admin_api.connect('', '', '', create_ddl=['create ddl'])
     self.assertEqual(admin_api.spanner_admin_api()._connection, connection)