def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def test_ccode_settings():
    raises(TypeError, lambda: ccode(sin(x), method="garbage"))