def delete(self, doc):
        if doc.id is None:
            raise DatabaseException('Document does not have id')
        if doc.sid is None:
            try:
                rs = self.db.docs.remove({'id': doc.id}, safe=True)
                assert rs['n'] == 1
            except Exception as e:
                raise DatabaseException(e)
            return None
        doc.data = None
        return self.update(doc)
def test_telemetry_run_organizing_init(runner, live_mock_server, parse_ctx):
    with runner.isolated_filesystem():
        wandb.init(name="test_name", tags=["my-tag"], config={"abc": 123}, id="mynewid")
        wandb.finish()

        ctx_util = parse_ctx(live_mock_server.get_ctx())
        telemetry = ctx_util.telemetry

        assert telemetry and 13 in telemetry.get("3", [])  # name
        assert telemetry and 14 in telemetry.get("3", [])  # id
        assert telemetry and 15 in telemetry.get("3", [])  # tags
        assert telemetry and 16 in telemetry.get("3", [])  # config