def schema(): """ Returns the basic schema of :class:`.Tag` .. http:get:: /api/v1/tags/schema/ HTTP/1.1 **Request** .. sourcecode:: http GET /api/v1/tags/schema/ HTTP/1.1 Accept: application/json **Response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "id": "INTEGER", "tag": "VARCHAR(64)" } :statuscode 200: no error """ return jsonify(Tag.to_schema())
def test_tags_schema(self): response = self.client.get("/api/v1/tags/schema") self.assert_ok(response) self.assertEqual(response.json, Tag.to_schema())