fintual-backend-devops-go / fixtures / contract / email_duplicate.json
email_duplicate.json
Raw
{
  "case": {
    "Name": "email_duplicate",
    "Method": "GET",
    "Path": "/api/users/find?email=duplicate%40example.com",
    "Body": ""
  },
  "status": 500,
  "headers": {
    "Content-Type": "text/plain",
    "Cross-Origin-Opener-Policy": "same-origin",
    "Referrer-Policy": "same-origin",
    "X-Content-Type-Options": "nosniff",
    "X-Frame-Options": "DENY"
  },
  "body": "Traceback (most recent call last):\n  File \"\u003crepo\u003e/.venv/lib/python3.14/site-packages/ninja/operation.py\", line 216, in run\n    result = self.view_func(request, **values)\n  File \"\u003crepo\u003e/blog/api.py\", line 116, in find_user_by_email\n    user = get_object_or_404(User, email=email)\n  File \"\u003crepo\u003e/.venv/lib/python3.14/site-packages/django/shortcuts.py\", line 90, in get_object_or_404\n    return queryset.get(*args, **kwargs)\n           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n  File \"\u003crepo\u003e/.venv/lib/python3.14/site-packages/django/db/models/query.py\", line 638, in get\n    raise self.model.MultipleObjectsReturned(\n    ...\u003c5 lines\u003e...\n    )\nblog.models.User.MultipleObjectsReturned: get() returned more than one User -- it returned 2!\n",
  "state": {
    "blog_comment": [
      {
        "author_id": 1,
        "body": "Second café",
        "created_at": "2024-02-01T00:00:00Z",
        "id": 2,
        "post_id": 1
      },
      {
        "author_id": 2,
        "body": "First",
        "created_at": "2024-02-01T00:00:00Z",
        "id": 1,
        "post_id": 1
      },
      {
        "author_id": 3,
        "body": "Draft comment",
        "created_at": "2024-02-02T00:00:00Z",
        "id": 3,
        "post_id": 2
      }
    ],
    "blog_comment_sequence": {
      "is_called": true,
      "last_value": 3
    },
    "blog_post": [
      {
        "author_id": 1,
        "body": "A body with 100% and under_score and café",
        "created_at": "2024-01-01T00:00:00Z",
        "id": 1,
        "is_published": true,
        "title": "Hello Python",
        "updated_at": "2024-01-01T00:00:00Z",
        "view_count": 7
      },
      {
        "author_id": 1,
        "body": "python hidden",
        "created_at": "2024-01-02T00:00:00Z",
        "id": 2,
        "is_published": false,
        "title": "Secret draft",
        "updated_at": "2024-01-02T00:00:00Z",
        "view_count": 0
      },
      {
        "author_id": 2,
        "body": "PYTHON and backslash \\\\",
        "created_at": "2024-01-03T00:00:00Z",
        "id": 3,
        "is_published": true,
        "title": "Unicode café 🚀",
        "updated_at": "2024-01-03T00:00:00Z",
        "view_count": 2
      },
      {
        "author_id": 3,
        "body": "unrelated content",
        "created_at": "2024-01-03T00:00:00Z",
        "id": 4,
        "is_published": true,
        "title": "Tied date",
        "updated_at": "2024-01-03T00:00:00Z",
        "view_count": 0
      }
    ],
    "blog_post_sequence": {
      "is_called": true,
      "last_value": 4
    },
    "blog_post_tags": [
      {
        "id": 1,
        "post_id": 1,
        "tag_id": 2
      },
      {
        "id": 2,
        "post_id": 1,
        "tag_id": 1
      },
      {
        "id": 3,
        "post_id": 2,
        "tag_id": 1
      },
      {
        "id": 4,
        "post_id": 3,
        "tag_id": 1
      }
    ],
    "blog_post_tags_sequence": {
      "is_called": true,
      "last_value": 4
    },
    "blog_tag": [
      {
        "created_at": "2024-01-01T00:00:00Z",
        "id": 1,
        "name": "Python",
        "slug": "python"
      },
      {
        "created_at": "2024-01-01T00:00:00Z",
        "id": 2,
        "name": "Django",
        "slug": "django"
      },
      {
        "created_at": "2024-01-01T00:00:00Z",
        "id": 3,
        "name": "Empty",
        "slug": "empty"
      }
    ],
    "blog_tag_sequence": {
      "is_called": true,
      "last_value": 3
    },
    "blog_user": [
      {
        "bio": "",
        "created_at": "2024-01-01T00:00:00Z",
        "display_name": "Bob",
        "email": "duplicate@example.com",
        "id": 2,
        "username": "bob"
      },
      {
        "bio": "",
        "created_at": "2024-01-01T00:00:00Z",
        "display_name": "Carol",
        "email": "duplicate@example.com",
        "id": 3,
        "username": "carol"
      },
      {
        "bio": "Author biography",
        "created_at": "2024-01-01T00:00:00Z",
        "display_name": "Alice",
        "email": "alice@example.com",
        "id": 1,
        "username": "alice"
      }
    ],
    "blog_user_sequence": {
      "is_called": true,
      "last_value": 3
    }
  }
}