diff --git a/.github/License-Apache_2.0-blue.svg b/.github/License-Apache_2.0-blue.svg
new file mode 100644
index 0000000..ca466ca
--- /dev/null
+++ b/.github/License-Apache_2.0-blue.svg
@@ -0,0 +1 @@
+License: Apache 2.0 License License Apache 2.0 Apache 2.0
\ No newline at end of file
diff --git a/.github/slack.svg b/.github/slack.svg
new file mode 100644
index 0000000..6cb641a
--- /dev/null
+++ b/.github/slack.svg
@@ -0,0 +1,20 @@
+
+ slack
+
+
+
+
+
+
+
+
+
+
+
+
+
+ slack
+ slack
+
+
+
\ No newline at end of file
diff --git a/README b/README
deleted file mode 100644
index 5165170..0000000
--- a/README
+++ /dev/null
@@ -1 +0,0 @@
-Sample Applications to try Keploy with Python Applications using external dependencies like MongoDB.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f14f414
--- /dev/null
+++ b/README.md
@@ -0,0 +1,41 @@
+
Keploy Python Sample Applications
+
+
+
+
+
+
+
+
+
+
+
+
+This repo contains the samples for [Keploy's](https://keploy.io) integration with Python-based Application. Please feel free to contribute if you'd like submit a sample for another use-case or library.
+
+> **Note** :- Issue Creation is disabled on this Repository, please visit [here](https://github.com/keploy/keploy/issues/new/choose) to submit Issue.
+
+## Python Sample Apps with Keploy
+
+1. [Flask-Mongo](https://github.com/keploy/samples-python/tree/main/flask-mongo) - This application is a simple task management API built using Python's Flask framework and MongoDB for data storage. It allows you to perform basic CRUD (Create, Read, Update, Delete) operations on student records. The API supports CORS (Cross-Origin Resource Sharing) to facilitate cross-domain requests.
+
+2. [Django-Postgres](https://github.com/keploy/samples-python/tree/main/django-postgres) - This is an application to perform basic CRUD (Create, Read, Update, Delete) operations on user records built using Python's Django framework and PostgreSQL for data storage.
+
+3. [FastAPI-Postgres](https://github.com/keploy/samples-python/tree/main/fastapi-postgres) - This application is a student management API built using Python's FastAPI and PostgreSQL for data storage. It allows you to perform basic CRUD (Create, Read, Update, Delete) operations on student data.
+
+4. [FastAPI-Twilio](https://github.com/keploy/samples-python/tree/main/fastapi-twilio) - This application is a SMS sending API built using Python's FastAPI and Twilio for their SMS sharing service.
+
+5. [Flask-Redis](https://github.com/keploy/samples-python/tree/main/flask-redis) - This Flask-based application provides a book management system utilizing Redis for caching and storage. It supports adding, retrieving, updating, and deleting book records, with optimized search functionality and cache management for improved performance. The API endpoints ensure efficient data handling and quick access to book information.
+
+## Community Support ❤️
+
+### 🤔 Questions?
+
+Reach out to us. We're here to help!
+
+[](https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg)
+[](https://www.linkedin.com/company/keploy/)
+[](https://www.youtube.com/channel/UC6OTg7F4o0WkmNtSoob34lg)
+[](https://twitter.com/Keployio)
+
+### 💖 Let's Build Together!
diff --git a/django-mongo/README.md b/django-mongo/README.md
new file mode 100644
index 0000000..ea2afb3
--- /dev/null
+++ b/django-mongo/README.md
@@ -0,0 +1,92 @@
+# Inventory Management Application
+
+## Overview
+
+A simple Django + MongoDB inventory management application using mongoengine and Django REST Framework to test Keploy integration capabilities using Django and MongoDB.
+The endpoints available will be:
+
+1. `GET /api/items/` - List all items
+2. `POST /api/items/` - Create a new item
+3. `GET /api/items//` - Retrieve an item by ID
+4. `PUT /api/items//` - Update an item by ID
+5. `DELETE /api/items//` - Delete an item by ID
+
+## Requirements
+
+- Python 3.x
+- Django
+- mongoengine
+- djangorestframework
+
+## Setup Instructions
+
+1. Clone the repository and navigate to project directory.
+ ```bash
+ git clone https://github.com/keploy/samples-python.git
+ cd samples-python/django-mongo/django_mongo
+ ```
+2. Install Keploy.
+ ```bash
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+ ```
+3. Start MongoDB instance.
+ ```bash
+ docker pull mongo
+ docker run --name mongodb -d -p 27017:27017 -v mongo_data:/data/db -e MONGO_INITDB_ROOT_USERNAME= -e MONGO_INITDB_ROOT_PASSWORD= mongo
+ ```
+4. Set up Django appllication.
+ ```bash
+ python3 -m virtualenv venv
+ source venv/bin/activate
+ pip3 install -r requirements.txt
+ ```
+5. Capture the testcases.
+ ```bash
+ keploy record -c "python3 manage.py runserver"
+ ```
+6. Generate testcases by making API calls.
+ ```bash
+ # List items
+ # GET /api/items/
+ curl -X GET http://localhost:8000/api/items/
+ ```
+ ```bash
+ # Create Item
+ # POST /api/items/
+ curl -X POST http://localhost:8000/api/items/ \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "Gadget C",
+ "quantity": 200,
+ "description": "A versatile gadget with numerous features."
+ }'
+ ```
+ ```bash
+ # Retrieve Item
+ # GET /api/items//
+ curl -X GET http://localhost:8000/api/items//
+ ```
+ ```bash
+ # Update Item
+ # PUT /api/items//
+ curl -X PUT http://localhost:8000/api/items/6142d21e122bda15f6f87b1d/ \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "Updated Widget A",
+ "quantity": 120,
+ "description": "An updated description for Widget A."
+ }'
+ ```
+ ```bash
+ # Delete Item
+ # DELETE /api/items//
+ curl -X DELETE http://localhost:8000/api/items//
+ ```
+ Replace `` with the actual ID of the item you want to retrieve, update, or delete.
+
+## Run the testcases
+
+Shut down MongoDB, Keploy doesn't need it during tests.
+```bash
+keploy test -c "python3 manage.py runserver" --delay 10
+```
\ No newline at end of file
diff --git a/django-mongo/django_mongo/django_mongo/__init__.py b/django-mongo/django_mongo/django_mongo/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/django-mongo/django_mongo/django_mongo/asgi.py b/django-mongo/django_mongo/django_mongo/asgi.py
new file mode 100644
index 0000000..0f6b170
--- /dev/null
+++ b/django-mongo/django_mongo/django_mongo/asgi.py
@@ -0,0 +1,16 @@
+"""
+ASGI config for django_mongo project.
+
+It exposes the ASGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/
+"""
+
+import os
+
+from django.core.asgi import get_asgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_mongo.settings')
+
+application = get_asgi_application()
diff --git a/django-mongo/django_mongo/django_mongo/settings.py b/django-mongo/django_mongo/django_mongo/settings.py
new file mode 100644
index 0000000..3ade7c6
--- /dev/null
+++ b/django-mongo/django_mongo/django_mongo/settings.py
@@ -0,0 +1,148 @@
+"""
+Django settings for django_mongo project.
+
+Generated by 'django-admin startproject' using Django 5.1.2.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/5.1/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/5.1/ref/settings/
+"""
+
+from pathlib import Path
+import mongoengine
+
+# Build paths inside the project like this: BASE_DIR / 'subdir'.
+BASE_DIR = Path(__file__).resolve().parent.parent
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'django-insecure-3g@-x5(3t(i(p^qnu9lz3hk1u1yobrvwz($5^ucvnn0a6b$%ob'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = [
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'rest_framework',
+ 'inventory',
+]
+
+REST_FRAMEWORK = {
+ 'DEFAULT_PERMISSION_CLASSES': [
+ 'rest_framework.permissions.AllowAny',
+ ],
+}
+
+MIDDLEWARE = [
+ 'django.middleware.security.SecurityMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+]
+
+ROOT_URLCONF = 'django_mongo.urls'
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'context_processors': [
+ 'django.template.context_processors.debug',
+ 'django.template.context_processors.request',
+ 'django.contrib.auth.context_processors.auth',
+ 'django.contrib.messages.context_processors.messages',
+ ],
+ },
+ },
+]
+
+WSGI_APPLICATION = 'django_mongo.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
+
+# DATABASES = {
+# 'default': {
+# 'ENGINE': 'django.db.backends.sqlite3',
+# 'NAME': BASE_DIR / 'db.sqlite3',
+# }
+# }
+
+
+# Password validation
+# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
+
+AUTH_PASSWORD_VALIDATORS = [
+ {
+ 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
+ },
+ {
+ 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
+ },
+]
+
+
+# Internationalization
+# https://docs.djangoproject.com/en/5.1/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/5.1/howto/static-files/
+
+STATIC_URL = 'static/'
+
+# Default primary key field type
+# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
+
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
+
+# MongoDB configuration
+MONGO_DB_NAME = 'inventory_db'
+MONGO_USER = 'admin'
+MONGO_PASSWORD = 'admin'
+MONGO_HOST = 'localhost'
+MONGO_PORT = 27017
+
+# Connect to MongoDB
+mongoengine.connect(
+ db=MONGO_DB_NAME,
+ username=MONGO_USER,
+ password=MONGO_PASSWORD,
+ host=MONGO_HOST,
+ port=MONGO_PORT
+)
\ No newline at end of file
diff --git a/django-mongo/django_mongo/django_mongo/urls.py b/django-mongo/django_mongo/django_mongo/urls.py
new file mode 100644
index 0000000..81af1ac
--- /dev/null
+++ b/django-mongo/django_mongo/django_mongo/urls.py
@@ -0,0 +1,23 @@
+"""
+URL configuration for django_mongo project.
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+ https://docs.djangoproject.com/en/5.1/topics/http/urls/
+Examples:
+Function views
+ 1. Add an import: from my_app import views
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
+Class-based views
+ 1. Add an import: from other_app.views import Home
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
+Including another URLconf
+ 1. Import the include() function: from django.urls import include, path
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
+"""
+from django.contrib import admin
+from django.urls import path, include
+
+urlpatterns = [
+ path('admin/', admin.site.urls),
+ path('api/', include('inventory.urls')),
+]
diff --git a/django-mongo/django_mongo/django_mongo/wsgi.py b/django-mongo/django_mongo/django_mongo/wsgi.py
new file mode 100644
index 0000000..a13bfdb
--- /dev/null
+++ b/django-mongo/django_mongo/django_mongo/wsgi.py
@@ -0,0 +1,16 @@
+"""
+WSGI config for django_mongo project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_mongo.settings')
+
+application = get_wsgi_application()
diff --git a/django-mongo/django_mongo/inventory/__init__.py b/django-mongo/django_mongo/inventory/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/django-mongo/django_mongo/inventory/admin.py b/django-mongo/django_mongo/inventory/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/django-mongo/django_mongo/inventory/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/django-mongo/django_mongo/inventory/apps.py b/django-mongo/django_mongo/inventory/apps.py
new file mode 100644
index 0000000..905749f
--- /dev/null
+++ b/django-mongo/django_mongo/inventory/apps.py
@@ -0,0 +1,6 @@
+from django.apps import AppConfig
+
+
+class InventoryConfig(AppConfig):
+ default_auto_field = 'django.db.models.BigAutoField'
+ name = 'inventory'
diff --git a/django-mongo/django_mongo/inventory/migrations/__init__.py b/django-mongo/django_mongo/inventory/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/django-mongo/django_mongo/inventory/models.py b/django-mongo/django_mongo/inventory/models.py
new file mode 100644
index 0000000..02dd773
--- /dev/null
+++ b/django-mongo/django_mongo/inventory/models.py
@@ -0,0 +1,7 @@
+from django.db import models
+from mongoengine import Document, StringField, IntField
+
+class Item(Document):
+ name = StringField(required=True)
+ quantity = IntField(required=True)
+ description = StringField()
\ No newline at end of file
diff --git a/django-mongo/django_mongo/inventory/serializers.py b/django-mongo/django_mongo/inventory/serializers.py
new file mode 100644
index 0000000..a178995
--- /dev/null
+++ b/django-mongo/django_mongo/inventory/serializers.py
@@ -0,0 +1,18 @@
+from rest_framework import serializers
+from .models import Item
+
+class ItemSerializer(serializers.Serializer):
+ id = serializers.CharField(read_only=True)
+ name = serializers.CharField(required=True)
+ quantity = serializers.IntegerField(required=True)
+ description = serializers.CharField(required=False)
+
+ def create(self, validated_data):
+ return Item(**validated_data).save()
+
+ def update(self, instance, validated_data):
+ instance.name = validated_data.get('name', instance.name)
+ instance.quantity = validated_data.get('quantity', instance.quantity)
+ instance.description = validated_data.get('description', instance.description)
+ instance.save()
+ return instance
diff --git a/django-mongo/django_mongo/inventory/tests.py b/django-mongo/django_mongo/inventory/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/django-mongo/django_mongo/inventory/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/django-mongo/django_mongo/inventory/urls.py b/django-mongo/django_mongo/inventory/urls.py
new file mode 100644
index 0000000..f35e225
--- /dev/null
+++ b/django-mongo/django_mongo/inventory/urls.py
@@ -0,0 +1,7 @@
+from django.urls import path
+from .views import ItemViewSet
+
+urlpatterns = [
+ path('items/', ItemViewSet.as_view({'get': 'list', 'post': 'create'})),
+ path('items//', ItemViewSet.as_view({'get': 'retrieve', 'put': 'update', 'delete': 'destroy'})),
+]
\ No newline at end of file
diff --git a/django-mongo/django_mongo/inventory/views.py b/django-mongo/django_mongo/inventory/views.py
new file mode 100644
index 0000000..6974df7
--- /dev/null
+++ b/django-mongo/django_mongo/inventory/views.py
@@ -0,0 +1,49 @@
+from django.shortcuts import render
+from rest_framework import viewsets
+from rest_framework.response import Response
+from rest_framework import status
+from .models import Item
+from .serializers import ItemSerializer
+
+class ItemViewSet(viewsets.ViewSet):
+
+ def list(self, request):
+ items = Item.objects.all()
+ serializer = ItemSerializer(items, many=True)
+ return Response(serializer.data)
+
+ def create(self, request):
+ serializer = ItemSerializer(data=request.data)
+ if serializer.is_valid():
+ item = Item(**serializer.validated_data)
+ item.save()
+ return Response(serializer.data, status=status.HTTP_201_CREATED)
+ return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
+
+ def retrieve(self, request, pk=None):
+ try:
+ item = Item.objects.get(id=pk)
+ serializer = ItemSerializer(item)
+ return Response(serializer.data)
+ except Item.DoesNotExist:
+ return Response(status=status.HTTP_404_NOT_FOUND)
+
+ def update(self, request, pk=None):
+ try:
+ item = Item.objects.get(id=pk)
+ serializer = ItemSerializer(item, data=request.data)
+ if serializer.is_valid():
+ updated_item = serializer.save() # This will call the update method
+ return Response(ItemSerializer(updated_item).data) # Serialize the updated item
+ return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
+ except Item.DoesNotExist:
+ return Response(status=status.HTTP_404_NOT_FOUND)
+
+
+ def destroy(self, request, pk=None):
+ try:
+ item = Item.objects.get(id=pk)
+ item.delete()
+ return Response(status=status.HTTP_204_NO_CONTENT)
+ except Item.DoesNotExist:
+ return Response(status=status.HTTP_404_NOT_FOUND)
\ No newline at end of file
diff --git a/django-mongo/django_mongo/keploy.yml b/django-mongo/django_mongo/keploy.yml
new file mode 100755
index 0000000..481f26f
--- /dev/null
+++ b/django-mongo/django_mongo/keploy.yml
@@ -0,0 +1,61 @@
+path: ""
+appId: 0
+appName: django_mongo
+command: python3 manage.py runserver
+templatize:
+ testSets: []
+port: 0
+dnsPort: 26789
+proxyPort: 16789
+debug: false
+disableTele: false
+disableANSI: false
+containerName: ""
+networkName: ""
+buildDelay: 30
+test:
+ selectedTests: {}
+ globalNoise:
+ global: {}
+ test-sets: {}
+ delay: 5
+ host: ""
+ port: 0
+ apiTimeout: 5
+ skipCoverage: false
+ coverageReportPath: ""
+ ignoreOrdering: true
+ mongoPassword: default@123
+ language: ""
+ removeUnusedMocks: false
+ fallBackOnMiss: false
+ jacocoAgentPath: ""
+ basePath: ""
+ mocking: true
+ ignoredTests: {}
+ disableLineCoverage: false
+ disableMockUpload: true
+ useLocalMock: false
+ updateTemplate: false
+record:
+ filters: []
+ recordTimer: 0s
+configPath: ""
+bypassRules: []
+generateGithubActions: false
+keployContainer: keploy-v2
+keployNetwork: keploy-network
+cmdType: native
+contract:
+ services: []
+ tests: []
+ path: ""
+ download: false
+ generate: false
+ driven: consumer
+ mappings:
+ servicesMapping: {}
+ self: ""
+inCi: false
+
+# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
diff --git a/django-mongo/django_mongo/keploy/test-set-0/mocks.yaml b/django-mongo/django_mongo/keploy/test-set-0/mocks.yaml
new file mode 100755
index 0000000..50d9642
--- /dev/null
+++ b/django-mongo/django_mongo/keploy/test-set-0/mocks.yaml
@@ -0,0 +1,490 @@
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-0
+spec:
+ metadata:
+ operation: '{ OpQuery flags: [], fullCollectionName: admin.$cmd, numberToSkip: 0, numberToReturn: -1, query: {"ismaster": {"$numberInt":"1"},"helloOk": true,"client": {"driver": {"name": "PyMongo|c|MongoEngine","version": "4.10.1|0.29.1"},"os": {"type": "Linux","name": "Linux","architecture": "x86_64","version": "6.5.0-1025-azure"},"platform": "CPython 3.12.1.final.0","env": {"container": {"runtime": "docker"}}}}, returnFieldsSelector: }'
+ type: config
+ requests:
+ - header:
+ length: 332
+ requestId: 1804289383
+ responseTo: 0
+ Opcode: 2004
+ message:
+ flags: 0
+ collection_name: admin.$cmd
+ number_to_skip: 0
+ number_to_return: -1
+ query: '{"ismaster":{"$numberInt":"1"},"helloOk":true,"client":{"driver":{"name":"PyMongo|c|MongoEngine","version":"4.10.1|0.29.1"},"os":{"type":"Linux","name":"Linux","architecture":"x86_64","version":"6.5.0-1025-azure"},"platform":"CPython 3.12.1.final.0","env":{"container":{"runtime":"docker"}}}}'
+ return_fields_selector: ""
+ responses:
+ - header:
+ length: 329
+ requestId: 125
+ responseTo: 1804289383
+ Opcode: 1
+ message:
+ response_flags: 8
+ cursor_id: 0
+ starting_from: 0
+ number_returned: 1
+ documents:
+ - '{"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"6713fe1e569046d9af25b0b5"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1729364654276"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"20"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"25"},"readOnly":false,"ok":{"$numberDouble":"1.0"}}'
+ read_delay: 640736
+ created: 1729364654
+ reqTimestampMock: 2024-10-19T19:04:14.276667841Z
+ resTimestampMock: 2024-10-19T19:04:14.277439441Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-1
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 65536, sections: [{ SectionSingle msg: {"hello":{"$numberInt":"1"},"topologyVersion":{"processId":{"$oid":"6713fe1e569046d9af25b0b5"},"counter":{"$numberLong":"0"}},"maxAwaitTimeMS":{"$numberInt":"10000"},"$db":"admin"} }], checksum: 0 }'
+ type: config
+ requests:
+ - header:
+ length: 134
+ requestId: 846930886
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 65536
+ sections:
+ - '{ SectionSingle msg: {"hello":{"$numberInt":"1"},"topologyVersion":{"processId":{"$oid":"6713fe1e569046d9af25b0b5"},"counter":{"$numberLong":"0"}},"maxAwaitTimeMS":{"$numberInt":"10000"},"$db":"admin"} }'
+ checksum: 0
+ read_delay: 1789950
+ responses:
+ - header:
+ length: 313
+ requestId: 129
+ responseTo: 846930886
+ Opcode: 2013
+ message:
+ flagBits: 2
+ sections:
+ - '{ SectionSingle msg: {"isWritablePrimary":true,"topologyVersion":{"processId":{"$oid":"6713fe1e569046d9af25b0b5"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1729364664289"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"20"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"25"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 10010192973
+ created: 1729364664
+ reqTimestampMock: 2024-10-19T19:04:14.279291948Z
+ resTimestampMock: 2024-10-19T19:04:24.289653646Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-2
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"hello":{"$numberInt":"1"},"$db":"admin"} }], checksum: 0 }'
+ type: config
+ requests:
+ - header:
+ length: 52
+ requestId: 1714636915
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"hello":{"$numberInt":"1"},"$db":"admin"} }'
+ checksum: 0
+ read_delay: 10002211829
+ responses:
+ - header:
+ length: 313
+ requestId: 130
+ responseTo: 1714636915
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"isWritablePrimary":true,"topologyVersion":{"processId":{"$oid":"6713fe1e569046d9af25b0b5"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1729364664291"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"21"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"25"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 238677
+ created: 1729364664
+ reqTimestampMock: 2024-10-19T19:04:24.291808444Z
+ resTimestampMock: 2024-10-19T19:04:24.292168839Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-3
+spec:
+ metadata:
+ operation: '{ OpQuery flags: [], fullCollectionName: admin.$cmd, numberToSkip: 0, numberToReturn: -1, query: {"ismaster": {"$numberInt":"1"},"helloOk": true,"client": {"driver": {"name": "PyMongo|c|MongoEngine","version": "4.10.1|0.29.1"},"os": {"type": "Linux","name": "Linux","architecture": "x86_64","version": "6.5.0-1025-azure"},"platform": "CPython 3.12.1.final.0","env": {"container": {"runtime": "docker"}}},"compression": [],"saslSupportedMechs": "admin.admin","speculativeAuthenticate": {"saslStart": {"$numberInt":"1"},"mechanism": "SCRAM-SHA-256","payload": {"$binary":{"base64":"biwsbj1hZG1pbixyPUlTVGRlTDJER25EeUd0MTMyM3dlbWo0d3BOTWZJRmhpalB6bThiUTk3ck09","subType":"00"}},"autoAuthorize": {"$numberInt":"1"},"options": {"skipEmptyExchange": true},"db": "admin"}}, returnFieldsSelector: }'
+ type: config
+ requests:
+ - header:
+ length: 598
+ requestId: 1957747793
+ responseTo: 0
+ Opcode: 2004
+ message:
+ flags: 0
+ collection_name: admin.$cmd
+ number_to_skip: 0
+ number_to_return: -1
+ query: '{"ismaster":{"$numberInt":"1"},"helloOk":true,"client":{"driver":{"name":"PyMongo|c|MongoEngine","version":"4.10.1|0.29.1"},"os":{"type":"Linux","name":"Linux","architecture":"x86_64","version":"6.5.0-1025-azure"},"platform":"CPython 3.12.1.final.0","env":{"container":{"runtime":"docker"}}},"compression":[],"saslSupportedMechs":"admin.admin","speculativeAuthenticate":{"saslStart":{"$numberInt":"1"},"mechanism":"SCRAM-SHA-256","payload":{"$binary":{"base64":"biwsbj1hZG1pbixyPUlTVGRlTDJER25EeUd0MTMyM3dlbWo0d3BOTWZJRmhpalB6bThiUTk3ck09","subType":"00"}},"autoAuthorize":{"$numberInt":"1"},"options":{"skipEmptyExchange":true},"db":"admin"}}'
+ return_fields_selector: ""
+ responses:
+ - header:
+ length: 594
+ requestId: 133
+ responseTo: 1957747793
+ Opcode: 1
+ message:
+ response_flags: 8
+ cursor_id: 0
+ starting_from: 0
+ number_returned: 1
+ documents:
+ - '{"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"6713fe1e569046d9af25b0b5"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1729364666167"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"24"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"25"},"readOnly":false,"saslSupportedMechs":["SCRAM-SHA-256","SCRAM-SHA-1"],"speculativeAuthenticate":{"conversationId":{"$numberInt":"1"},"done":false,"payload":{"$binary":{"base64":"cj1JU1RkZUwyREduRHlHdDEzMjN3ZW1qNHdwTk1mSUZoaWpQem04YlE5N3JNPS9lU1YzSWZBb3ZIemlUWXFJVHAwbWx5ZjgySzdydlZFLHM9OUtUMFQ5b0YrUlQzV0dFWmZTb3gzNXNZYng2d2RlZVNEeXpHWWc9PSxpPTE1MDAw","subType":"00"}}},"ok":{"$numberDouble":"1.0"}}'
+ read_delay: 802600
+ created: 1729364666
+ reqTimestampMock: 2024-10-19T19:04:26.166927988Z
+ resTimestampMock: 2024-10-19T19:04:26.167862404Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-4
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"saslContinue":{"$numberInt":"1"},"conversationId":{"$numberInt":"1"},"payload":{"$binary":{"base64":"Yz1iaXdzLHI9SVNUZGVMMkRHbkR5R3QxMzIzd2VtajR3cE5NZklGaGlqUHptOGJROTdyTT0vZVNWM0lmQW92SHppVFlxSVRwMG1seWY4Mks3cnZWRSxwPXlERG1PYzA1ZWdwaEpaallKZTY2MnEyWGs3SHNKS1VDaU1vVVV6SW5VTVk9","subType":"00"}},"$db":"admin"} }], checksum: 0 }'
+ type: config
+ requests:
+ - header:
+ length: 225
+ requestId: 424238335
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"saslContinue":{"$numberInt":"1"},"conversationId":{"$numberInt":"1"},"payload":{"$binary":{"base64":"Yz1iaXdzLHI9SVNUZGVMMkRHbkR5R3QxMzIzd2VtajR3cE5NZklGaGlqUHptOGJROTdyTT0vZVNWM0lmQW92SHppVFlxSVRwMG1seWY4Mks3cnZWRSxwPXlERG1PYzA1ZWdwaEpaallKZTY2MnEyWGs3SHNKS1VDaU1vVVV6SW5VTVk9","subType":"00"}},"$db":"admin"} }'
+ checksum: 0
+ read_delay: 5086782
+ responses:
+ - header:
+ length: 125
+ requestId: 134
+ responseTo: 424238335
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"conversationId":{"$numberInt":"1"},"done":true,"payload":{"$binary":{"base64":"dj1VUzhRbi8wbTErM1JoS2tNNmZRaHFqK2lRdGxIaUtXendmL3VKZXgwSVZRPQ==","subType":"00"}},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 304558
+ created: 1729364666
+ reqTimestampMock: 2024-10-19T19:04:26.173006844Z
+ resTimestampMock: 2024-10-19T19:04:26.173411679Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-5
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"item","filter":{},"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 112
+ requestId: 719885386
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"item","filter":{},"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }'
+ checksum: 0
+ read_delay: 572687
+ responses:
+ - header:
+ length: 224
+ requestId: 135
+ responseTo: 719885386
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"_id":{"$oid":"6713ff286b75650a56907678"},"name":"Gadget C","quantity":{"$numberInt":"200"},"description":"A versatile gadget with numerous features."}],"id":{"$numberLong":"0"},"ns":"inventory_db.item"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 492359
+ created: 1729364666
+ reqTimestampMock: 2024-10-19T19:04:26.174063774Z
+ resTimestampMock: 2024-10-19T19:04:26.174647202Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-6
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"ismaster":{"$numberInt":"1"},"helloOk":true,"$db":"admin"} }], checksum: 0 }'
+ type: config
+ requests:
+ - header:
+ length: 65
+ requestId: 1957747793
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"ismaster":{"$numberInt":"1"},"helloOk":true,"$db":"admin"} }'
+ checksum: 0
+ read_delay: 10001778949
+ responses:
+ - header:
+ length: 314
+ requestId: 136
+ responseTo: 1957747793
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"6713fe1e569046d9af25b0b5"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1729364674294"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"21"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"25"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 370160
+ created: 1729364674
+ reqTimestampMock: 2024-10-19T19:04:34.294047203Z
+ resTimestampMock: 2024-10-19T19:04:34.294532769Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-7
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"insert":"item","ordered":true,"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }, { SectionSingle identifier: documents , msgs: [ {"_id":{"$oid":"671402e72887cb944c43b8ba"},"name":"Gadget C","quantity":{"$numberInt":"200"},"description":"A versatile gadget with numerous features."} ] }], checksum: 0 }'
+ requests:
+ - header:
+ length: 241
+ requestId: 1350490027
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"insert":"item","ordered":true,"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }'
+ - '{ SectionSingle identifier: documents , msgs: [ {"_id":{"$oid":"671402e72887cb944c43b8ba"},"name":"Gadget C","quantity":{"$numberInt":"200"},"description":"A versatile gadget with numerous features."} ] }'
+ checksum: 0
+ read_delay: 45695442201
+ responses:
+ - header:
+ length: 45
+ requestId: 157
+ responseTo: 1350490027
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"n":{"$numberInt":"1"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 498127
+ created: 1729364711
+ reqTimestampMock: 2024-10-19T19:05:11.870212614Z
+ resTimestampMock: 2024-10-19T19:05:11.870816598Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-8
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"item","filter":{"_id":{"$oid":"6713ff286b75650a56907678"}},"limit":{"$numberInt":"2"},"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 140
+ requestId: 1365180540
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"item","filter":{"_id":{"$oid":"6713ff286b75650a56907678"}},"limit":{"$numberInt":"2"},"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }'
+ checksum: 0
+ read_delay: 39270780350
+ responses:
+ - header:
+ length: 224
+ requestId: 174
+ responseTo: 1365180540
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"_id":{"$oid":"6713ff286b75650a56907678"},"name":"Gadget C","quantity":{"$numberInt":"200"},"description":"A versatile gadget with numerous features."}],"id":{"$numberLong":"0"},"ns":"inventory_db.item"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 407362
+ created: 1729364751
+ reqTimestampMock: 2024-10-19T19:05:51.141679843Z
+ resTimestampMock: 2024-10-19T19:05:51.142418243Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-9
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"item","filter":{"_id":{"$oid":"6713ff286b75650a56907678"}},"limit":{"$numberInt":"2"},"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 140
+ requestId: 233665123
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"item","filter":{"_id":{"$oid":"6713ff286b75650a56907678"}},"limit":{"$numberInt":"2"},"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }'
+ checksum: 0
+ read_delay: 99571750729
+ responses:
+ - header:
+ length: 224
+ requestId: 215
+ responseTo: 233665123
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"_id":{"$oid":"6713ff286b75650a56907678"},"name":"Gadget C","quantity":{"$numberInt":"200"},"description":"A versatile gadget with numerous features."}],"id":{"$numberLong":"0"},"ns":"inventory_db.item"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 421459
+ created: 1729364850
+ reqTimestampMock: 2024-10-19T19:07:30.714254912Z
+ resTimestampMock: 2024-10-19T19:07:30.714797717Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-10
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"update":"item","ordered":true,"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }, { SectionSingle identifier: updates , msgs: [ {"q":{"_id":{"$oid":"6713ff286b75650a56907678"}},"u":{"$set":{"name":"Updated Widget A","quantity":{"$numberInt":"120"},"description":"An updated description for Widget A."}},"multi":false,"upsert":true} ] }], checksum: 0 }'
+ requests:
+ - header:
+ length: 285
+ requestId: 2145174067
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"update":"item","ordered":true,"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }'
+ - '{ SectionSingle identifier: updates , msgs: [ {"q":{"_id":{"$oid":"6713ff286b75650a56907678"}},"u":{"$set":{"name":"Updated Widget A","quantity":{"$numberInt":"120"},"description":"An updated description for Widget A."}},"multi":false,"upsert":true} ] }'
+ checksum: 0
+ read_delay: 1179499
+ responses:
+ - header:
+ length: 60
+ requestId: 216
+ responseTo: 2145174067
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"n":{"$numberInt":"1"},"nModified":{"$numberInt":"1"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 511395
+ created: 1729364850
+ reqTimestampMock: 2024-10-19T19:07:30.716062926Z
+ resTimestampMock: 2024-10-19T19:07:30.716661092Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-11
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"item","filter":{"_id":{"$oid":"6713ff286b75650a56907678"}},"limit":{"$numberInt":"2"},"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 140
+ requestId: 1369133069
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"item","filter":{"_id":{"$oid":"6713ff286b75650a56907678"}},"limit":{"$numberInt":"2"},"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }'
+ checksum: 0
+ read_delay: 49267790804
+ responses:
+ - header:
+ length: 226
+ requestId: 237
+ responseTo: 1369133069
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"_id":{"$oid":"6713ff286b75650a56907678"},"name":"Updated Widget A","quantity":{"$numberInt":"120"},"description":"An updated description for Widget A."}],"id":{"$numberLong":"0"},"ns":"inventory_db.item"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 458793
+ created: 1729364899
+ reqTimestampMock: 2024-10-19T19:08:19.984540733Z
+ resTimestampMock: 2024-10-19T19:08:19.98511404Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-12
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"delete":"item","ordered":true,"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }, { SectionSingle identifier: deletes , msgs: [ {"q":{"_id":{"$oid":"6713ff286b75650a56907678"}},"limit":{"$numberInt":"0"}} ] }], checksum: 0 }'
+ requests:
+ - header:
+ length: 165
+ requestId: 1125898167
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"delete":"item","ordered":true,"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }'
+ - '{ SectionSingle identifier: deletes , msgs: [ {"q":{"_id":{"$oid":"6713ff286b75650a56907678"}},"limit":{"$numberInt":"0"}} ] }'
+ checksum: 0
+ read_delay: 750270
+ responses:
+ - header:
+ length: 45
+ requestId: 238
+ responseTo: 1125898167
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"n":{"$numberInt":"1"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 377687
+ created: 1729364899
+ reqTimestampMock: 2024-10-19T19:08:19.985934962Z
+ resTimestampMock: 2024-10-19T19:08:19.986405462Z
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-13
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"item","filter":{},"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 112
+ requestId: 2089018456
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"item","filter":{},"lsid":{"id":{"$binary":{"base64":"czkuEpfTSBak1dx74/p4iA==","subType":"04"}}},"$db":"inventory_db"} }'
+ checksum: 0
+ read_delay: 8085196300
+ responses:
+ - header:
+ length: 224
+ requestId: 243
+ responseTo: 2089018456
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"_id":{"$oid":"671402e72887cb944c43b8ba"},"name":"Gadget C","quantity":{"$numberInt":"200"},"description":"A versatile gadget with numerous features."}],"id":{"$numberLong":"0"},"ns":"inventory_db.item"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 486370
+ created: 1729364908
+ reqTimestampMock: 2024-10-19T19:08:28.071683686Z
+ resTimestampMock: 2024-10-19T19:08:28.072290581Z
diff --git a/django-mongo/django_mongo/keploy/test-set-0/tests/test-1.yaml b/django-mongo/django_mongo/keploy/test-set-0/tests/test-1.yaml
new file mode 100755
index 0000000..47b6d72
--- /dev/null
+++ b/django-mongo/django_mongo/keploy/test-set-0/tests/test-1.yaml
@@ -0,0 +1,44 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/api/items/
+ header:
+ Accept: '*/*'
+ Host: localhost:8000
+ User-Agent: curl/7.68.0
+ body: ""
+ timestamp: 2024-10-19T19:04:26.158535156Z
+ resp:
+ status_code: 200
+ header:
+ Allow: GET, POST, HEAD, OPTIONS
+ Content-Length: "127"
+ Content-Type: application/json
+ Date: Sat, 19 Oct 2024 19:04:26 GMT
+ Referrer-Policy: same-origin
+ Server: WSGIServer/0.2 CPython/3.12.1
+ Vary: Accept, Cookie
+ X-Content-Type-Options: nosniff
+ X-Frame-Options: DENY
+ body: '[{"id":"6713ff286b75650a56907678","name":"Gadget C","quantity":200,"description":"A versatile gadget with numerous features."}]'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-19T19:04:28.257078042Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1729364668
+curl: |
+ curl --request GET \
+ --url http://localhost:8000/api/items/ \
+ --header 'Accept: */*' \
+ --header 'Host: localhost:8000' \
+ --header 'User-Agent: curl/7.68.0' \
diff --git a/django-mongo/django_mongo/keploy/test-set-0/tests/test-2.yaml b/django-mongo/django_mongo/keploy/test-set-0/tests/test-2.yaml
new file mode 100755
index 0000000..3c83896
--- /dev/null
+++ b/django-mongo/django_mongo/keploy/test-set-0/tests/test-2.yaml
@@ -0,0 +1,53 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-2
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/api/items/
+ header:
+ Accept: '*/*'
+ Content-Length: "113"
+ Content-Type: application/json
+ Host: localhost:8000
+ User-Agent: curl/7.68.0
+ body: |-
+ {
+ "name": "Gadget C",
+ "quantity": 200,
+ "description": "A versatile gadget with numerous features."
+ }
+ timestamp: 2024-10-19T19:05:11.862316346Z
+ resp:
+ status_code: 201
+ header:
+ Allow: GET, POST, HEAD, OPTIONS
+ Content-Length: "93"
+ Content-Type: application/json
+ Date: Sat, 19 Oct 2024 19:05:11 GMT
+ Referrer-Policy: same-origin
+ Server: WSGIServer/0.2 CPython/3.12.1
+ Vary: Accept, Cookie
+ X-Content-Type-Options: nosniff
+ X-Frame-Options: DENY
+ body: '{"name":"Gadget C","quantity":200,"description":"A versatile gadget with numerous features."}'
+ status_message: Created
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-19T19:05:13.966578004Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1729364713
+curl: |-
+ curl --request POST \
+ --url http://localhost:8000/api/items/ \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:8000' \
+ --header 'User-Agent: curl/7.68.0' \
+ --header 'Accept: */*' \
+ --data "{\n \"name\": \"Gadget C\",\n \"quantity\": 200,\n \"description\": \"A versatile gadget with numerous features.\"\n }"
diff --git a/django-mongo/django_mongo/keploy/test-set-0/tests/test-3.yaml b/django-mongo/django_mongo/keploy/test-set-0/tests/test-3.yaml
new file mode 100755
index 0000000..f9ef6f5
--- /dev/null
+++ b/django-mongo/django_mongo/keploy/test-set-0/tests/test-3.yaml
@@ -0,0 +1,44 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-3
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/api/items/6713ff286b75650a56907678/
+ header:
+ Accept: '*/*'
+ Host: localhost:8000
+ User-Agent: curl/7.68.0
+ body: ""
+ timestamp: 2024-10-19T19:05:51.140167751Z
+ resp:
+ status_code: 200
+ header:
+ Allow: GET, PUT, DELETE, HEAD, OPTIONS
+ Content-Length: "125"
+ Content-Type: application/json
+ Date: Sat, 19 Oct 2024 19:05:51 GMT
+ Referrer-Policy: same-origin
+ Server: WSGIServer/0.2 CPython/3.12.1
+ Vary: Accept, Cookie
+ X-Content-Type-Options: nosniff
+ X-Frame-Options: DENY
+ body: '{"id":"6713ff286b75650a56907678","name":"Gadget C","quantity":200,"description":"A versatile gadget with numerous features."}'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-19T19:05:53.163490949Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1729364753
+curl: |
+ curl --request GET \
+ --url http://localhost:8000/api/items/6713ff286b75650a56907678/ \
+ --header 'User-Agent: curl/7.68.0' \
+ --header 'Accept: */*' \
+ --header 'Host: localhost:8000' \
diff --git a/django-mongo/django_mongo/keploy/test-set-0/tests/test-4.yaml b/django-mongo/django_mongo/keploy/test-set-0/tests/test-4.yaml
new file mode 100755
index 0000000..5b841a2
--- /dev/null
+++ b/django-mongo/django_mongo/keploy/test-set-0/tests/test-4.yaml
@@ -0,0 +1,48 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-4
+spec:
+ metadata: {}
+ req:
+ method: PUT
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/api/items/6713ff286b75650a56907678/
+ header:
+ Accept: '*/*'
+ Content-Length: "110"
+ Content-Type: application/json
+ Host: localhost:8000
+ User-Agent: curl/7.68.0
+ body: '{ "name": "Updated Widget A", "quantity": 120, "description": "An updated description for Widget A."}'
+ timestamp: 2024-10-19T19:07:30.712800581Z
+ resp:
+ status_code: 200
+ header:
+ Allow: GET, PUT, DELETE, HEAD, OPTIONS
+ Content-Length: "127"
+ Content-Type: application/json
+ Date: Sat, 19 Oct 2024 19:07:30 GMT
+ Referrer-Policy: same-origin
+ Server: WSGIServer/0.2 CPython/3.12.1
+ Vary: Accept, Cookie
+ X-Content-Type-Options: nosniff
+ X-Frame-Options: DENY
+ body: '{"id":"6713ff286b75650a56907678","name":"Updated Widget A","quantity":120,"description":"An updated description for Widget A."}'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-19T19:07:32.720391721Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1729364852
+curl: |-
+ curl --request PUT \
+ --url http://localhost:8000/api/items/6713ff286b75650a56907678/ \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:8000' \
+ --header 'User-Agent: curl/7.68.0' \
+ --data "{ \"name\": \"Updated Widget A\", \"quantity\": 120, \"description\": \"An updated description for Widget A.\"}"
diff --git a/django-mongo/django_mongo/keploy/test-set-0/tests/test-5.yaml b/django-mongo/django_mongo/keploy/test-set-0/tests/test-5.yaml
new file mode 100755
index 0000000..8bd7999
--- /dev/null
+++ b/django-mongo/django_mongo/keploy/test-set-0/tests/test-5.yaml
@@ -0,0 +1,43 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-5
+spec:
+ metadata: {}
+ req:
+ method: DELETE
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/api/items/6713ff286b75650a56907678/
+ header:
+ Accept: '*/*'
+ Host: localhost:8000
+ User-Agent: curl/7.68.0
+ body: ""
+ timestamp: 2024-10-19T19:08:19.983000488Z
+ resp:
+ status_code: 204
+ header:
+ Allow: GET, PUT, DELETE, HEAD, OPTIONS
+ Content-Length: "0"
+ Date: Sat, 19 Oct 2024 19:08:19 GMT
+ Referrer-Policy: same-origin
+ Server: WSGIServer/0.2 CPython/3.12.1
+ Vary: Accept, Cookie
+ X-Content-Type-Options: nosniff
+ X-Frame-Options: DENY
+ body: ""
+ status_message: No Content
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-19T19:08:22.044354383Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1729364902
+curl: |
+ curl --request DELETE \
+ --url http://localhost:8000/api/items/6713ff286b75650a56907678/ \
+ --header 'User-Agent: curl/7.68.0' \
+ --header 'Accept: */*' \
+ --header 'Host: localhost:8000' \
diff --git a/django-mongo/django_mongo/manage.py b/django-mongo/django_mongo/manage.py
new file mode 100755
index 0000000..f3fd315
--- /dev/null
+++ b/django-mongo/django_mongo/manage.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+"""Django's command-line utility for administrative tasks."""
+import os
+import sys
+
+
+def main():
+ """Run administrative tasks."""
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_mongo.settings')
+ try:
+ from django.core.management import execute_from_command_line
+ except ImportError as exc:
+ raise ImportError(
+ "Couldn't import Django. Are you sure it's installed and "
+ "available on your PYTHONPATH environment variable? Did you "
+ "forget to activate a virtual environment?"
+ ) from exc
+ execute_from_command_line(sys.argv)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/django-mongo/django_mongo/products.json b/django-mongo/django_mongo/products.json
new file mode 100644
index 0000000..1099bda
--- /dev/null
+++ b/django-mongo/django_mongo/products.json
@@ -0,0 +1,32 @@
+[
+ {
+ "name": "Widget A",
+ "quantity": 100,
+ "description": "A high-quality widget that serves many purposes."
+ },
+ {
+ "name": "Widget B",
+ "quantity": 150,
+ "description": "An essential widget for every toolkit."
+ },
+ {
+ "name": "Gadget C",
+ "quantity": 200,
+ "description": "A versatile gadget with numerous features."
+ },
+ {
+ "name": "Gadget D",
+ "quantity": 50,
+ "description": "A compact gadget perfect for small spaces."
+ },
+ {
+ "name": "Tool E",
+ "quantity": 75,
+ "description": "A durable tool designed for heavy use."
+ },
+ {
+ "name": "Tool F",
+ "quantity": 120,
+ "description": "An ergonomic tool for comfortable handling."
+ }
+]
\ No newline at end of file
diff --git a/django-mongo/django_mongo/requirements.txt b/django-mongo/django_mongo/requirements.txt
new file mode 100644
index 0000000..cc08838
--- /dev/null
+++ b/django-mongo/django_mongo/requirements.txt
@@ -0,0 +1,3 @@
+Django>=3.2,<4.0
+djangorestframework>=3.12,<4.0
+mongoengine>=0.20,<1.0
\ No newline at end of file
diff --git a/django-postgres/README.md b/django-postgres/README.md
index 6d3f815..1f04ac2 100644
--- a/django-postgres/README.md
+++ b/django-postgres/README.md
@@ -1,6 +1,6 @@
# User Data CRUD Application
-A sample user data CRUD app to test Keploy integration capabilities using [Django](https://www.djangoproject.com/) and PostgreSQL.
+A sample user data CRUD app to test Keploy integration capabilities using [Django](https://www.djangoproject.com/) and [PostgreSQL](https://www.postgresql.org/).
Make the following requests to the respective endpoints -
1. `GET /user/` - To get all the data at once.
@@ -19,25 +19,11 @@ git clone https://github.com/keploy/samples-python.git && cd samples-python/djan
Keploy can be installed on Linux directly and on Windows with the help of WSL. Based on your system architecture, install the keploy latest binary release
-**1. AMD Architecture**
-
-```shell
-curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
-
-sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
-```
-
-
- 2. ARM Architecture
-
-```shell
-curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz -C /tmp
-
-sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
+```bash
+ curl -O https://keploy.io/install.sh && source install.sh
+ keploy
```
-
-
### Starting the PostgreSQL Instance
```bash
@@ -106,13 +92,13 @@ This will return all the data saved in the database.
### Make a GET request to get a specific data
```bash
-curl --location 'http://127.0.0.1:8000/user/c793c752-ad95-4cff-8cbe-5715a1e8a76e/'
+curl --location 'http://127.0.0.1:8000/user/'
```
### Make a PUT request to update a specific data
```bash
-curl --location --request PUT 'http://127.0.0.1:8000/user/efbe12df-3cae-4cbc-b045-dc74840aa82b/' \
+curl --location --request PUT 'http://127.0.0.1:8000/user/' \
--header 'Content-Type: application/json' \
--data-raw ' {
"name": "Jane Smith",
@@ -125,7 +111,7 @@ curl --location --request PUT 'http://127.0.0.1:8000/user/efbe12df-3cae-4cbc-b04
### Make a DELETE request to delete a specific data
```bash
-curl --location --request DELETE 'http://127.0.0.1:8000/user/ee2af3fc-0503-4a6a-a452-b7d8c87a085b/'
+curl --location --request DELETE 'http://127.0.0.1:8000/user/'
```
Now both these API calls were captured as **editable** testcases and written to `keploy/tests` folder. The keploy directory would also have `mocks` file that contains all the outputs of postgres operations.
@@ -138,18 +124,4 @@ Now let's run the application in test mode.
sudo -E keploy test -c "python3 manage.py runserver" --delay 10
```
-So no need to setup fake database/apis like Postgres or write mocks for them. Keploy automatically mocks them and, **The application thinks it's talking to Postgres 😄**
-
-# Using Docker
-
-Keploy can be used on Linux & Windows through Docker, and on MacOS by the help of [Colima](https://docs.keploy.io/docs/server/macos/installation/#using-colima)
-
-## Create Keploy Alias
-
-To establish a network for your application using Keploy on Docker, follow these steps.
-
-If you're using a docker-compose network, replace keploy-network with your app's `docker_compose_network_name` below.
-
-```shell
-alias keploy='sudo docker run --pull always --name keploy-v2 -p 16789:16789 --privileged --pid=host -it -v "$(pwd)":/files -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy'
-```
+So, no need to setup fake database/apis like Postgres or write mocks for them. Keploy automatically mocks them and, **The application thinks it's talking to Postgres 😄**
diff --git a/django-postgres/django_postgres/application/__pycache__/__init__.cpython-311.pyc b/django-postgres/django_postgres/application/__pycache__/__init__.cpython-311.pyc
new file mode 100644
index 0000000..cc721f2
Binary files /dev/null and b/django-postgres/django_postgres/application/__pycache__/__init__.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/application/__pycache__/admin.cpython-311.pyc b/django-postgres/django_postgres/application/__pycache__/admin.cpython-311.pyc
new file mode 100644
index 0000000..d3fbbfc
Binary files /dev/null and b/django-postgres/django_postgres/application/__pycache__/admin.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/application/__pycache__/apps.cpython-311.pyc b/django-postgres/django_postgres/application/__pycache__/apps.cpython-311.pyc
new file mode 100644
index 0000000..485ad77
Binary files /dev/null and b/django-postgres/django_postgres/application/__pycache__/apps.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/application/__pycache__/models.cpython-311.pyc b/django-postgres/django_postgres/application/__pycache__/models.cpython-311.pyc
new file mode 100644
index 0000000..3fff588
Binary files /dev/null and b/django-postgres/django_postgres/application/__pycache__/models.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/application/__pycache__/serializers.cpython-311.pyc b/django-postgres/django_postgres/application/__pycache__/serializers.cpython-311.pyc
new file mode 100644
index 0000000..9dde198
Binary files /dev/null and b/django-postgres/django_postgres/application/__pycache__/serializers.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/application/__pycache__/urls.cpython-311.pyc b/django-postgres/django_postgres/application/__pycache__/urls.cpython-311.pyc
new file mode 100644
index 0000000..3c1e8f8
Binary files /dev/null and b/django-postgres/django_postgres/application/__pycache__/urls.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/application/__pycache__/views.cpython-311.pyc b/django-postgres/django_postgres/application/__pycache__/views.cpython-311.pyc
new file mode 100644
index 0000000..48caa6d
Binary files /dev/null and b/django-postgres/django_postgres/application/__pycache__/views.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/application/migrations/__pycache__/0001_initial.cpython-311.pyc b/django-postgres/django_postgres/application/migrations/__pycache__/0001_initial.cpython-311.pyc
new file mode 100644
index 0000000..b9c2567
Binary files /dev/null and b/django-postgres/django_postgres/application/migrations/__pycache__/0001_initial.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/application/migrations/__pycache__/__init__.cpython-311.pyc b/django-postgres/django_postgres/application/migrations/__pycache__/__init__.cpython-311.pyc
new file mode 100644
index 0000000..f590a08
Binary files /dev/null and b/django-postgres/django_postgres/application/migrations/__pycache__/__init__.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/application/views.py b/django-postgres/django_postgres/application/views.py
index 6bea49c..2c1ff2b 100644
--- a/django-postgres/django_postgres/application/views.py
+++ b/django-postgres/django_postgres/application/views.py
@@ -38,13 +38,16 @@ def get_update_deleteUser(request, uuid: uuid4):
return JsonResponse({"message": "User Deleted!!"})
except Exception as e:
return JsonResponse({"message": str(e)[2:-2]})
-
+
+
@api_view(["GET", "POST"])
def getAll_createUser(request):
if request.method == "GET":
try:
data = UserSerializer(User.objects.all(), many=True)
+ if data.data == []:
+ return JsonResponse({"message": "No Users Found!!"})
return Response(data.data)
except Exception as e:
return JsonResponse({"message": str(e)})
diff --git a/django-postgres/django_postgres/django_postgres/__pycache__/__init__.cpython-311.pyc b/django-postgres/django_postgres/django_postgres/__pycache__/__init__.cpython-311.pyc
new file mode 100644
index 0000000..191a991
Binary files /dev/null and b/django-postgres/django_postgres/django_postgres/__pycache__/__init__.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/django_postgres/__pycache__/settings.cpython-311.pyc b/django-postgres/django_postgres/django_postgres/__pycache__/settings.cpython-311.pyc
new file mode 100644
index 0000000..64c167b
Binary files /dev/null and b/django-postgres/django_postgres/django_postgres/__pycache__/settings.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/django_postgres/__pycache__/urls.cpython-311.pyc b/django-postgres/django_postgres/django_postgres/__pycache__/urls.cpython-311.pyc
new file mode 100644
index 0000000..ec505fa
Binary files /dev/null and b/django-postgres/django_postgres/django_postgres/__pycache__/urls.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/django_postgres/__pycache__/wsgi.cpython-311.pyc b/django-postgres/django_postgres/django_postgres/__pycache__/wsgi.cpython-311.pyc
new file mode 100644
index 0000000..a163e98
Binary files /dev/null and b/django-postgres/django_postgres/django_postgres/__pycache__/wsgi.cpython-311.pyc differ
diff --git a/django-postgres/django_postgres/django_postgres/settings.py b/django-postgres/django_postgres/django_postgres/settings.py
index abe5353..2791ed4 100644
--- a/django-postgres/django_postgres/django_postgres/settings.py
+++ b/django-postgres/django_postgres/django_postgres/settings.py
@@ -82,7 +82,7 @@
'USER': 'postgres',
'PASSWORD': 'postgres',
'HOST': '0.0.0.0',
- 'PORT': '6000',
+ 'PORT': '5432',
}
}
diff --git a/django-postgres/django_postgres/docker-compose.yml b/django-postgres/django_postgres/docker-compose.yml
index d81491d..e5a43b7 100644
--- a/django-postgres/django_postgres/docker-compose.yml
+++ b/django-postgres/django_postgres/docker-compose.yml
@@ -8,7 +8,7 @@ services:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- - "6000:5432" # Map the PostgreSQL port to the host machine
+ - "5432:5432" # Map the PostgreSQL port to the host machine
volumes:
- ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql
diff --git a/django-postgres/django_postgres/keploy/test-set-0/mocks.yaml b/django-postgres/django_postgres/keploy/test-set-0/mocks.yaml
deleted file mode 100755
index 4187b07..0000000
--- a/django-postgres/django_postgres/keploy/test-set-0/mocks.yaml
+++ /dev/null
@@ -1,815 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAACATSFi8=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: Tg==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAAPQADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHVzZXJzZGIAY2xpZW50X2VuY29kaW5nAFVURjgAAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAABcAAAAKU0NSQU0tU0hBLTI1NgAA
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAADZTQ1JBTS1TSEEtMjU2AAAAACBuLCxuPSxyPUlBcFVSNDdPS0IvTnRCN2NWNjY0TWVGdA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAAFwAAAALcj1JQXBVUjQ3T0tCL050QjdjVjY2NE1lRnQ3Q0J1eUNHRDBUNWk0WXVLSWloUXl5cXkscz12Z0RnUnRhbndUS1QreGVxbEVQTGl3PT0saT00MDk2
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAAGxjPWJpd3Mscj1JQXBVUjQ3T0tCL050QjdjVjY2NE1lRnQ3Q0J1eUNHRDBUNWk0WXVLSWloUXl5cXkscD1jMWxBdFhXd01MOFFlWmhLdTAwQzdaUzl2VjZHUFBicmpuNVM2cGtpMFIwPQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAADYAAAAMdj1EQzJBR2lsbmxqMTludkhySEVtY0toMVBHTXlINU5uYWNuZVNnN2l3WERJPVIAAAAIAAAAAFMAAAAXaW5faG90X3N0YW5kYnkAb2ZmAFMAAAAZaW50ZWdlcl9kYXRldGltZXMAb24AUwAAABVUaW1lWm9uZQBFdGMvVVRDAFMAAAAbSW50ZXJ2YWxTdHlsZQBwb3N0Z3JlcwBTAAAAFGlzX3N1cGVydXNlcgBvbgBTAAAAFmFwcGxpY2F0aW9uX25hbWUAAFMAAAAmZGVmYXVsdF90cmFuc2FjdGlvbl9yZWFkX29ubHkAb2ZmAFMAAAAac2NyYW1faXRlcmF0aW9ucwA0MDk2AFMAAAAXRGF0ZVN0eWxlAElTTywgTURZAFMAAAAjc3RhbmRhcmRfY29uZm9ybWluZ19zdHJpbmdzAG9uAFMAAAAjc2Vzc2lvbl9hdXRob3JpemF0aW9uAHBvc3RncmVzAFMAAAAZY2xpZW50X2VuY29kaW5nAFVURjgAUwAAADJzZXJ2ZXJfdmVyc2lvbgAxNi4wIChEZWJpYW4gMTYuMC0xLnBnZGcxMjArMSkAUwAAABlzZXJ2ZXJfZW5jb2RpbmcAVVRGOABLAAAADAAAAJ1G35ynWgAAAAVJ
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAADBTRUxFQ1Qgc2V0X2NvbmZpZygnVGltZVpvbmUnLCAnVVRDJywgZmFsc2UpAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAACMAAXNldF9jb25maWcAAAAAAAAAAAAAGf///////wAARAAAAA0AAQAAAANVVENDAAAADVNFTEVDVCAxAFMAAAARVGltZVpvbmUAVVRDAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAkcKICAgICAgICAgICAgU0VMRUNUCiAgICAgICAgICAgICAgICBjLnJlbG5hbWUsCiAgICAgICAgICAgICAgICBDQVNFCiAgICAgICAgICAgICAgICAgICAgV0hFTiBjLnJlbGlzcGFydGl0aW9uIFRIRU4gJ3AnCiAgICAgICAgICAgICAgICAgICAgV0hFTiBjLnJlbGtpbmQgSU4gKCdtJywgJ3YnKSBUSEVOICd2JwogICAgICAgICAgICAgICAgICAgIEVMU0UgJ3QnCiAgICAgICAgICAgICAgICBFTkQsCiAgICAgICAgICAgICAgICBvYmpfZGVzY3JpcHRpb24oYy5vaWQsICdwZ19jbGFzcycpCiAgICAgICAgICAgIEZST00gcGdfY2F0YWxvZy5wZ19jbGFzcyBjCiAgICAgICAgICAgIExFRlQgSk9JTiBwZ19jYXRhbG9nLnBnX25hbWVzcGFjZSBuIE9OIG4ub2lkID0gYy5yZWxuYW1lc3BhY2UKICAgICAgICAgICAgV0hFUkUgYy5yZWxraW5kIElOICgnZicsICdtJywgJ3AnLCAncicsICd2JykKICAgICAgICAgICAgICAgIEFORCBuLm5zcG5hbWUgTk9UIElOICgncGdfY2F0YWxvZycsICdwZ190b2FzdCcpCiAgICAgICAgICAgICAgICBBTkQgcGdfY2F0YWxvZy5wZ190YWJsZV9pc192aXNpYmxlKGMub2lkKQogICAgICAgIAA=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAAFkAA3JlbG5hbWUAAAAE6wACAAAAEwBA/////wAAY2FzZQAAAAAAAAAAAAAZ////////AABvYmpfZGVzY3JpcHRpb24AAAAAAAAAAAAAGf///////wAARAAAACQAAwAAABFkamFuZ29fbWlncmF0aW9ucwAAAAF0/////0QAAAAmAAMAAAATZGphbmdvX2NvbnRlbnRfdHlwZQAAAAF0/////0QAAAAiAAMAAAAPYXV0aF9wZXJtaXNzaW9uAAAAAXT/////RAAAAB0AAwAAAAphdXRoX2dyb3VwAAAAAXT/////RAAAACkAAwAAABZhdXRoX2dyb3VwX3Blcm1pc3Npb25zAAAAAXT/////RAAAABwAAwAAAAlhdXRoX3VzZXIAAAABdP////9EAAAAIwADAAAAEGF1dGhfdXNlcl9ncm91cHMAAAABdP////9EAAAALQADAAAAGmF1dGhfdXNlcl91c2VyX3Blcm1pc3Npb25zAAAAAXT/////RAAAACMAAwAAABBkamFuZ29fYWRtaW5fbG9nAAAAAXT/////RAAAACEAAwAAAA5kamFuZ29fc2Vzc2lvbgAAAAF0/////0QAAAAjAAMAAAAQYXBwbGljYXRpb25fdXNlcgAAAAF0/////0MAAAAOU0VMRUNUIDExAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAACATSFi8=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: Tg==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAAPQADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHVzZXJzZGIAY2xpZW50X2VuY29kaW5nAFVURjgAAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAABcAAAAKU0NSQU0tU0hBLTI1NgAA
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAADZTQ1JBTS1TSEEtMjU2AAAAACBuLCxuPSxyPXRGdGJZNUtJZmJmdnk1SjMvZXFKeG1TcQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAAFwAAAALcj10RnRiWTVLSWZiZnZ5NUozL2VxSnhtU3FtRmdjN0x3NXdpSjZURWJvdStqWDhrZloscz12Z0RnUnRhbndUS1QreGVxbEVQTGl3PT0saT00MDk2
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAAGxjPWJpd3Mscj10RnRiWTVLSWZiZnZ5NUozL2VxSnhtU3FtRmdjN0x3NXdpSjZURWJvdStqWDhrZloscD1jVklKMGNYVFZxY0FySW1XOGdMT3FPZE9iUGFFTzJ6SEZXUlBDMnpGb240PQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAADYAAAAMdj1pR1h0SDVRY0h4a3V5aGpOS2hIU0phUHQ2NTZubjg4YzdjNUhXUnRBaXFjPVIAAAAIAAAAAFMAAAAXaW5faG90X3N0YW5kYnkAb2ZmAFMAAAAZaW50ZWdlcl9kYXRldGltZXMAb24AUwAAABVUaW1lWm9uZQBFdGMvVVRDAFMAAAAbSW50ZXJ2YWxTdHlsZQBwb3N0Z3JlcwBTAAAAFGlzX3N1cGVydXNlcgBvbgBTAAAAFmFwcGxpY2F0aW9uX25hbWUAAFMAAAAmZGVmYXVsdF90cmFuc2FjdGlvbl9yZWFkX29ubHkAb2ZmAFMAAAAac2NyYW1faXRlcmF0aW9ucwA0MDk2AFMAAAAXRGF0ZVN0eWxlAElTTywgTURZAFMAAAAjc3RhbmRhcmRfY29uZm9ybWluZ19zdHJpbmdzAG9uAFMAAAAjc2Vzc2lvbl9hdXRob3JpemF0aW9uAHBvc3RncmVzAFMAAAAZY2xpZW50X2VuY29kaW5nAFVURjgAUwAAADJzZXJ2ZXJfdmVyc2lvbgAxNi4wIChEZWJpYW4gMTYuMC0xLnBnZGcxMjArMSkAUwAAABlzZXJ2ZXJfZW5jb2RpbmcAVVRGOABLAAAADAAAAJ8NjGb5WgAAAAVJ
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAADBTRUxFQ1Qgc2V0X2NvbmZpZygnVGltZVpvbmUnLCAnVVRDJywgZmFsc2UpAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAACMAAXNldF9jb25maWcAAAAAAAAAAAAAGf///////wAARAAAAA0AAQAAAANVVENDAAAADVNFTEVDVCAxAFMAAAARVGltZVpvbmUAVVRDAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAM1JTlNFUlQgSU5UTyAiYXBwbGljYXRpb25fdXNlciIgKCJpZCIsICJuYW1lIiwgImVtYWlsIiwgInBhc3N3b3JkIiwgIndlYnNpdGUiKSBWQUxVRVMgKCdkNzhhNjI2MDAwNzc0ZjU4YjQ1Y2Y2OGIyODQzMDQwMCc6OnV1aWQsICdKYW5lIFNtaXRoJywgJ2phbmUuc21pdGhAZXhhbXBsZS5jb20nLCAnc21pdGg1NjcnLCAnd3d3LmphbmVzbWl0aC5jb20nKQA=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: QwAAAA9JTlNFUlQgMCAxAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAACATSFi8=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: Tg==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAAPQADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHVzZXJzZGIAY2xpZW50X2VuY29kaW5nAFVURjgAAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAABcAAAAKU0NSQU0tU0hBLTI1NgAA
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAADZTQ1JBTS1TSEEtMjU2AAAAACBuLCxuPSxyPUxhQ1BpS0R4aUV1Qm1UdDlwRHIyZkxoRQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAAFwAAAALcj1MYUNQaUtEeGlFdUJtVHQ5cERyMmZMaEU4c1MzUVlwcTFFRXd5dnhmY1dQcDZCTmoscz12Z0RnUnRhbndUS1QreGVxbEVQTGl3PT0saT00MDk2
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAAGxjPWJpd3Mscj1MYUNQaUtEeGlFdUJtVHQ5cERyMmZMaEU4c1MzUVlwcTFFRXd5dnhmY1dQcDZCTmoscD15TGRkTDRNdldQb3h5bVJXOFNiVi9vS00wQXhSa2IrVkRsQ01WQ0VtekVnPQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAADYAAAAMdj1QZUk1WE5YTzV4VG8rdVdyOWlvajBKQmFQcitwQktKOEV6eGduRGNqNk5VPVIAAAAIAAAAAFMAAAAXaW5faG90X3N0YW5kYnkAb2ZmAFMAAAAZaW50ZWdlcl9kYXRldGltZXMAb24AUwAAABVUaW1lWm9uZQBFdGMvVVRDAFMAAAAbSW50ZXJ2YWxTdHlsZQBwb3N0Z3JlcwBTAAAAFGlzX3N1cGVydXNlcgBvbgBTAAAAFmFwcGxpY2F0aW9uX25hbWUAAFMAAAAmZGVmYXVsdF90cmFuc2FjdGlvbl9yZWFkX29ubHkAb2ZmAFMAAAAac2NyYW1faXRlcmF0aW9ucwA0MDk2AFMAAAAXRGF0ZVN0eWxlAElTTywgTURZAFMAAAAjc3RhbmRhcmRfY29uZm9ybWluZ19zdHJpbmdzAG9uAFMAAAAjc2Vzc2lvbl9hdXRob3JpemF0aW9uAHBvc3RncmVzAFMAAAAZY2xpZW50X2VuY29kaW5nAFVURjgAUwAAADJzZXJ2ZXJfdmVyc2lvbgAxNi4wIChEZWJpYW4gMTYuMC0xLnBnZGcxMjArMSkAUwAAABlzZXJ2ZXJfZW5jb2RpbmcAVVRGOABLAAAADAAAAKHzPy7/WgAAAAVJ
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAADBTRUxFQ1Qgc2V0X2NvbmZpZygnVGltZVpvbmUnLCAnVVRDJywgZmFsc2UpAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAACMAAXNldF9jb25maWcAAAAAAAAAAAAAGf///////wAARAAAAA0AAQAAAANVVENDAAAADVNFTEVDVCAxAFMAAAARVGltZVpvbmUAVVRDAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAK9TRUxFQ1QgImFwcGxpY2F0aW9uX3VzZXIiLiJpZCIsICJhcHBsaWNhdGlvbl91c2VyIi4ibmFtZSIsICJhcHBsaWNhdGlvbl91c2VyIi4iZW1haWwiLCAiYXBwbGljYXRpb25fdXNlciIuInBhc3N3b3JkIiwgImFwcGxpY2F0aW9uX3VzZXIiLiJ3ZWJzaXRlIiBGUk9NICJhcHBsaWNhdGlvbl91c2VyIgA=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAAH8ABWlkAAAAQJcAAQAAC4YAEP////8AAG5hbWUAAABAlwACAAAEE///AAAANgAAZW1haWwAAABAlwADAAAEE///AAABAgAAcGFzc3dvcmQAAABAlwAEAAAEE///AAAANgAAd2Vic2l0ZQAAAECXAAUAAAQT//8AAAA2AABEAAAAdwAFAAAAJGQ3OGE2MjYwLTAwNzctNGY1OC1iNDVjLWY2OGIyODQzMDQwMAAAAApKYW5lIFNtaXRoAAAAFmphbmUuc21pdGhAZXhhbXBsZS5jb20AAAAIc21pdGg1NjcAAAARd3d3LmphbmVzbWl0aC5jb21DAAAADVNFTEVDVCAxAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAACATSFi8=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: Tg==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAAPQADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHVzZXJzZGIAY2xpZW50X2VuY29kaW5nAFVURjgAAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAABcAAAAKU0NSQU0tU0hBLTI1NgAA
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAADZTQ1JBTS1TSEEtMjU2AAAAACBuLCxuPSxyPUZaS0MxVXlLNWVsSWl5MEFIemNoQnVvVw==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAAFwAAAALcj1GWktDMVV5SzVlbElpeTBBSHpjaEJ1b1dWc25iVFMrT1Q3ZWdNanNKd0xVTnIvWmMscz12Z0RnUnRhbndUS1QreGVxbEVQTGl3PT0saT00MDk2
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAAGxjPWJpd3Mscj1GWktDMVV5SzVlbElpeTBBSHpjaEJ1b1dWc25iVFMrT1Q3ZWdNanNKd0xVTnIvWmMscD1jN0hyUkpaZ3BPakhyMHV6TEhyT1VnUUptMTA4Q3ZXV1VCcWhvSHlJb2FjPQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAADYAAAAMdj15ZHdPanVhZzd1alRESXRXMDVyakZOSlhjaFF1MDVRY2JKWVJBYUgvVWI4PVIAAAAIAAAAAFMAAAAXaW5faG90X3N0YW5kYnkAb2ZmAFMAAAAZaW50ZWdlcl9kYXRldGltZXMAb24AUwAAABVUaW1lWm9uZQBFdGMvVVRDAFMAAAAbSW50ZXJ2YWxTdHlsZQBwb3N0Z3JlcwBTAAAAFGlzX3N1cGVydXNlcgBvbgBTAAAAFmFwcGxpY2F0aW9uX25hbWUAAFMAAAAmZGVmYXVsdF90cmFuc2FjdGlvbl9yZWFkX29ubHkAb2ZmAFMAAAAac2NyYW1faXRlcmF0aW9ucwA0MDk2AFMAAAAXRGF0ZVN0eWxlAElTTywgTURZAFMAAAAjc3RhbmRhcmRfY29uZm9ybWluZ19zdHJpbmdzAG9uAFMAAAAjc2Vzc2lvbl9hdXRob3JpemF0aW9uAHBvc3RncmVzAFMAAAAZY2xpZW50X2VuY29kaW5nAFVURjgAUwAAADJzZXJ2ZXJfdmVyc2lvbgAxNi4wIChEZWJpYW4gMTYuMC0xLnBnZGcxMjArMSkAUwAAABlzZXJ2ZXJfZW5jb2RpbmcAVVRGOABLAAAADAAAAKKaN39YWgAAAAVJ
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAADBTRUxFQ1Qgc2V0X2NvbmZpZygnVGltZVpvbmUnLCAnVVRDJywgZmFsc2UpAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAACMAAXNldF9jb25maWcAAAAAAAAAAAAAGf///////wAARAAAAA0AAQAAAANVVENDAAAADVNFTEVDVCAxAFMAAAARVGltZVpvbmUAVVRDAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAMZJTlNFUlQgSU5UTyAiYXBwbGljYXRpb25fdXNlciIgKCJpZCIsICJuYW1lIiwgImVtYWlsIiwgInBhc3N3b3JkIiwgIndlYnNpdGUiKSBWQUxVRVMgKCc5ZjkzMTY2ZDM4MzM0NGMyYjkwNmVkZWM5MDE0ZTBkNSc6OnV1aWQsICdKb2huIERvZScsICdqb2huLmRvZUBleGFtcGxlLmNvbScsICdqb2huNTY3JywgJ3d3dy5qb2huZG9lLmNvbScpAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: QwAAAA9JTlNFUlQgMCAxAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAACATSFi8=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: Tg==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAAPQADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHVzZXJzZGIAY2xpZW50X2VuY29kaW5nAFVURjgAAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAABcAAAAKU0NSQU0tU0hBLTI1NgAA
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAADZTQ1JBTS1TSEEtMjU2AAAAACBuLCxuPSxyPXF5NzZMamhDbzUrUDllOG1CZmFPU0c0WQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAAFwAAAALcj1xeTc2TGpoQ281K1A5ZThtQmZhT1NHNFk3UnpZdzlhaDRuWkhoR2NXbnR3Ry9ic1cscz12Z0RnUnRhbndUS1QreGVxbEVQTGl3PT0saT00MDk2
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAAGxjPWJpd3Mscj1xeTc2TGpoQ281K1A5ZThtQmZhT1NHNFk3UnpZdzlhaDRuWkhoR2NXbnR3Ry9ic1cscD1rbEp4UUVDcGlSb3N1YjBQT3FIRnVCanJxNlI5SDd0U2dnWlpYdUtsT1pZPQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAADYAAAAMdj1xdlJoMGVhWXRKRkcyU24vRUF0b1BsZWE2Qk50SGhud2x3ZEFTdW5JMTl3PVIAAAAIAAAAAFMAAAAXaW5faG90X3N0YW5kYnkAb2ZmAFMAAAAZaW50ZWdlcl9kYXRldGltZXMAb24AUwAAABVUaW1lWm9uZQBFdGMvVVRDAFMAAAAbSW50ZXJ2YWxTdHlsZQBwb3N0Z3JlcwBTAAAAFGlzX3N1cGVydXNlcgBvbgBTAAAAFmFwcGxpY2F0aW9uX25hbWUAAFMAAAAmZGVmYXVsdF90cmFuc2FjdGlvbl9yZWFkX29ubHkAb2ZmAFMAAAAac2NyYW1faXRlcmF0aW9ucwA0MDk2AFMAAAAXRGF0ZVN0eWxlAElTTywgTURZAFMAAAAjc3RhbmRhcmRfY29uZm9ybWluZ19zdHJpbmdzAG9uAFMAAAAjc2Vzc2lvbl9hdXRob3JpemF0aW9uAHBvc3RncmVzAFMAAAAZY2xpZW50X2VuY29kaW5nAFVURjgAUwAAADJzZXJ2ZXJfdmVyc2lvbgAxNi4wIChEZWJpYW4gMTYuMC0xLnBnZGcxMjArMSkAUwAAABlzZXJ2ZXJfZW5jb2RpbmcAVVRGOABLAAAADAAAAKW8DV8xWgAAAAVJ
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAADBTRUxFQ1Qgc2V0X2NvbmZpZygnVGltZVpvbmUnLCAnVVRDJywgZmFsc2UpAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAACMAAXNldF9jb25maWcAAAAAAAAAAAAAGf///////wAARAAAAA0AAQAAAANVVENDAAAADVNFTEVDVCAxAFMAAAARVGltZVpvbmUAVVRDAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAQFTRUxFQ1QgImFwcGxpY2F0aW9uX3VzZXIiLiJpZCIsICJhcHBsaWNhdGlvbl91c2VyIi4ibmFtZSIsICJhcHBsaWNhdGlvbl91c2VyIi4iZW1haWwiLCAiYXBwbGljYXRpb25fdXNlciIuInBhc3N3b3JkIiwgImFwcGxpY2F0aW9uX3VzZXIiLiJ3ZWJzaXRlIiBGUk9NICJhcHBsaWNhdGlvbl91c2VyIiBXSEVSRSAiYXBwbGljYXRpb25fdXNlciIuImlkIiA9ICdkNzhhNjI2MDAwNzc0ZjU4YjQ1Y2Y2OGIyODQzMDQwMCc6OnV1aWQgTElNSVQgMjEA
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAAH8ABWlkAAAAQJcAAQAAC4YAEP////8AAG5hbWUAAABAlwACAAAEE///AAAANgAAZW1haWwAAABAlwADAAAEE///AAABAgAAcGFzc3dvcmQAAABAlwAEAAAEE///AAAANgAAd2Vic2l0ZQAAAECXAAUAAAQT//8AAAA2AABEAAAAdwAFAAAAJGQ3OGE2MjYwLTAwNzctNGY1OC1iNDVjLWY2OGIyODQzMDQwMAAAAApKYW5lIFNtaXRoAAAAFmphbmUuc21pdGhAZXhhbXBsZS5jb20AAAAIc21pdGg1NjcAAAARd3d3LmphbmVzbWl0aC5jb21DAAAADVNFTEVDVCAxAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAACATSFi8=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: Tg==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAAPQADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHVzZXJzZGIAY2xpZW50X2VuY29kaW5nAFVURjgAAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAABcAAAAKU0NSQU0tU0hBLTI1NgAA
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAADZTQ1JBTS1TSEEtMjU2AAAAACBuLCxuPSxyPVNybkowT2Foc0lZVjl5U0JkaUorMllaUg==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAAFwAAAALcj1Tcm5KME9haHNJWVY5eVNCZGlKKzJZWlIvMmErNGNQS3dkdjhRNHZmd0t0aVIyYzUscz12Z0RnUnRhbndUS1QreGVxbEVQTGl3PT0saT00MDk2
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAAGxjPWJpd3Mscj1Tcm5KME9haHNJWVY5eVNCZGlKKzJZWlIvMmErNGNQS3dkdjhRNHZmd0t0aVIyYzUscD05K1dpRE1oelptMmpBR1lEanpvT0FuNE5MaE11REd0UlFzZTNFU0hRRGhRPQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAADYAAAAMdj1OcmdtVDJMMUQ1UHBsRlI4dyszQ1FzZWlua3RiRWRXL29VL01LZVRDcUs4PVIAAAAIAAAAAFMAAAAXaW5faG90X3N0YW5kYnkAb2ZmAFMAAAAZaW50ZWdlcl9kYXRldGltZXMAb24AUwAAABVUaW1lWm9uZQBFdGMvVVRDAFMAAAAbSW50ZXJ2YWxTdHlsZQBwb3N0Z3JlcwBTAAAAFGlzX3N1cGVydXNlcgBvbgBTAAAAFmFwcGxpY2F0aW9uX25hbWUAAFMAAAAmZGVmYXVsdF90cmFuc2FjdGlvbl9yZWFkX29ubHkAb2ZmAFMAAAAac2NyYW1faXRlcmF0aW9ucwA0MDk2AFMAAAAXRGF0ZVN0eWxlAElTTywgTURZAFMAAAAjc3RhbmRhcmRfY29uZm9ybWluZ19zdHJpbmdzAG9uAFMAAAAjc2Vzc2lvbl9hdXRob3JpemF0aW9uAHBvc3RncmVzAFMAAAAZY2xpZW50X2VuY29kaW5nAFVURjgAUwAAADJzZXJ2ZXJfdmVyc2lvbgAxNi4wIChEZWJpYW4gMTYuMC0xLnBnZGcxMjArMSkAUwAAABlzZXJ2ZXJfZW5jb2RpbmcAVVRGOABLAAAADAAAAKhZfv48WgAAAAVJ
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAADBTRUxFQ1Qgc2V0X2NvbmZpZygnVGltZVpvbmUnLCAnVVRDJywgZmFsc2UpAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAACMAAXNldF9jb25maWcAAAAAAAAAAAAAGf///////wAARAAAAA0AAQAAAANVVENDAAAADVNFTEVDVCAxAFMAAAARVGltZVpvbmUAVVRDAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAQFTRUxFQ1QgImFwcGxpY2F0aW9uX3VzZXIiLiJpZCIsICJhcHBsaWNhdGlvbl91c2VyIi4ibmFtZSIsICJhcHBsaWNhdGlvbl91c2VyIi4iZW1haWwiLCAiYXBwbGljYXRpb25fdXNlciIuInBhc3N3b3JkIiwgImFwcGxpY2F0aW9uX3VzZXIiLiJ3ZWJzaXRlIiBGUk9NICJhcHBsaWNhdGlvbl91c2VyIiBXSEVSRSAiYXBwbGljYXRpb25fdXNlciIuImlkIiA9ICdkNzhhNjI2MDAwNzc0ZjU4YjQ1Y2Y2OGIyODQzMDQwMCc6OnV1aWQgTElNSVQgMjEA
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAAH8ABWlkAAAAQJcAAQAAC4YAEP////8AAG5hbWUAAABAlwACAAAEE///AAAANgAAZW1haWwAAABAlwADAAAEE///AAABAgAAcGFzc3dvcmQAAABAlwAEAAAEE///AAAANgAAd2Vic2l0ZQAAAECXAAUAAAQT//8AAAA2AABEAAAAdwAFAAAAJGQ3OGE2MjYwLTAwNzctNGY1OC1iNDVjLWY2OGIyODQzMDQwMAAAAApKYW5lIFNtaXRoAAAAFmphbmUuc21pdGhAZXhhbXBsZS5jb20AAAAIc21pdGg1NjcAAAARd3d3LmphbmVzbWl0aC5jb21DAAAADVNFTEVDVCAxAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAN9VUERBVEUgImFwcGxpY2F0aW9uX3VzZXIiIFNFVCAibmFtZSIgPSAnSmFuZSBTbWl0aCcsICJlbWFpbCIgPSAnc21pdGguamFuZUBleGFtcGxlLmNvbScsICJwYXNzd29yZCIgPSAnc21pdGg1NjcnLCAid2Vic2l0ZSIgPSAnd3d3LnNtaXRoamFuZS5jb20nIFdIRVJFICJhcHBsaWNhdGlvbl91c2VyIi4iaWQiID0gJ2Q3OGE2MjYwMDA3NzRmNThiNDVjZjY4YjI4NDMwNDAwJzo6dXVpZAA=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: QwAAAA1VUERBVEUgMQBaAAAABUk=
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAACATSFi8=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: Tg==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAAPQADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHVzZXJzZGIAY2xpZW50X2VuY29kaW5nAFVURjgAAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAABcAAAAKU0NSQU0tU0hBLTI1NgAA
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAADZTQ1JBTS1TSEEtMjU2AAAAACBuLCxuPSxyPUJib2ZPZ21mbTN5b2tucXJibXBYTk1kTQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAAFwAAAALcj1CYm9mT2dtZm0zeW9rbnFyYm1wWE5NZE13VCtmbGhPR0dkdjZpU3VNUmNEQllpSUMscz12Z0RnUnRhbndUS1QreGVxbEVQTGl3PT0saT00MDk2
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAAGxjPWJpd3Mscj1CYm9mT2dtZm0zeW9rbnFyYm1wWE5NZE13VCtmbGhPR0dkdjZpU3VNUmNEQllpSUMscD16dFRZVC94MkloekZ2MHhYOEtsWWwzeG9ueXJqV1F6N0phWi9SL0pRdUpBPQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAADYAAAAMdj1JcitoTGRLUThPaUVreGZuL0VSNUIwbElwQkE5R0kvMzUvLzEySW80VlRFPVIAAAAIAAAAAFMAAAAXaW5faG90X3N0YW5kYnkAb2ZmAFMAAAAZaW50ZWdlcl9kYXRldGltZXMAb24AUwAAABVUaW1lWm9uZQBFdGMvVVRDAFMAAAAbSW50ZXJ2YWxTdHlsZQBwb3N0Z3JlcwBTAAAAFGlzX3N1cGVydXNlcgBvbgBTAAAAFmFwcGxpY2F0aW9uX25hbWUAAFMAAAAmZGVmYXVsdF90cmFuc2FjdGlvbl9yZWFkX29ubHkAb2ZmAFMAAAAac2NyYW1faXRlcmF0aW9ucwA0MDk2AFMAAAAXRGF0ZVN0eWxlAElTTywgTURZAFMAAAAjc3RhbmRhcmRfY29uZm9ybWluZ19zdHJpbmdzAG9uAFMAAAAjc2Vzc2lvbl9hdXRob3JpemF0aW9uAHBvc3RncmVzAFMAAAAZY2xpZW50X2VuY29kaW5nAFVURjgAUwAAADJzZXJ2ZXJfdmVyc2lvbgAxNi4wIChEZWJpYW4gMTYuMC0xLnBnZGcxMjArMSkAUwAAABlzZXJ2ZXJfZW5jb2RpbmcAVVRGOABLAAAADAAAAKr8N1/xWgAAAAVJ
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAADBTRUxFQ1Qgc2V0X2NvbmZpZygnVGltZVpvbmUnLCAnVVRDJywgZmFsc2UpAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAACMAAXNldF9jb25maWcAAAAAAAAAAAAAGf///////wAARAAAAA0AAQAAAANVVENDAAAADVNFTEVDVCAxAFMAAAARVGltZVpvbmUAVVRDAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAQFTRUxFQ1QgImFwcGxpY2F0aW9uX3VzZXIiLiJpZCIsICJhcHBsaWNhdGlvbl91c2VyIi4ibmFtZSIsICJhcHBsaWNhdGlvbl91c2VyIi4iZW1haWwiLCAiYXBwbGljYXRpb25fdXNlciIuInBhc3N3b3JkIiwgImFwcGxpY2F0aW9uX3VzZXIiLiJ3ZWJzaXRlIiBGUk9NICJhcHBsaWNhdGlvbl91c2VyIiBXSEVSRSAiYXBwbGljYXRpb25fdXNlciIuImlkIiA9ICdkNzhhNjI2MDAwNzc0ZjU4YjQ1Y2Y2OGIyODQzMDQwMCc6OnV1aWQgTElNSVQgMjEA
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAAH8ABWlkAAAAQJcAAQAAC4YAEP////8AAG5hbWUAAABAlwACAAAEE///AAAANgAAZW1haWwAAABAlwADAAAEE///AAABAgAAcGFzc3dvcmQAAABAlwAEAAAEE///AAAANgAAd2Vic2l0ZQAAAECXAAUAAAQT//8AAAA2AABEAAAAdwAFAAAAJGQ3OGE2MjYwLTAwNzctNGY1OC1iNDVjLWY2OGIyODQzMDQwMAAAAApKYW5lIFNtaXRoAAAAFnNtaXRoLmphbmVAZXhhbXBsZS5jb20AAAAIc21pdGg1NjcAAAARd3d3LnNtaXRoamFuZS5jb21DAAAADVNFTEVDVCAxAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAG9ERUxFVEUgRlJPTSAiYXBwbGljYXRpb25fdXNlciIgV0hFUkUgImFwcGxpY2F0aW9uX3VzZXIiLiJpZCIgSU4gKCdkNzhhNjI2MDAwNzc0ZjU4YjQ1Y2Y2OGIyODQzMDQwMCc6OnV1aWQpAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: QwAAAA1ERUxFVEUgMQBaAAAABUk=
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAACATSFi8=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: Tg==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: AAAAPQADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHVzZXJzZGIAY2xpZW50X2VuY29kaW5nAFVURjgAAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAABcAAAAKU0NSQU0tU0hBLTI1NgAA
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAADZTQ1JBTS1TSEEtMjU2AAAAACBuLCxuPSxyPWRnZVIzY05KV1o0RWZ6NGgwWG0wc090bA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAAFwAAAALcj1kZ2VSM2NOSldaNEVmejRoMFhtMHNPdGxTU3pBYnJBSVV4OG1DVWxPMWpUdXhKWWUscz12Z0RnUnRhbndUS1QreGVxbEVQTGl3PT0saT00MDk2
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: cAAAAGxjPWJpd3Mscj1kZ2VSM2NOSldaNEVmejRoMFhtMHNPdGxTU3pBYnJBSVV4OG1DVWxPMWpUdXhKWWUscD1TYVIzMmxJS0xCdHJxRzdZWlYzTVZNUVNSODVqSkw3L1k2ZDg3V08rQmJBPQ==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: UgAAADYAAAAMdj1Gc0RuWnZTeWhLYW95Q1NLV0hGaEhYSFYyRUpSZm9Fd0o0K2UxV3c3YmRvPVIAAAAIAAAAAFMAAAAXaW5faG90X3N0YW5kYnkAb2ZmAFMAAAAZaW50ZWdlcl9kYXRldGltZXMAb24AUwAAABVUaW1lWm9uZQBFdGMvVVRDAFMAAAAbSW50ZXJ2YWxTdHlsZQBwb3N0Z3JlcwBTAAAAFGlzX3N1cGVydXNlcgBvbgBTAAAAFmFwcGxpY2F0aW9uX25hbWUAAFMAAAAmZGVmYXVsdF90cmFuc2FjdGlvbl9yZWFkX29ubHkAb2ZmAFMAAAAac2NyYW1faXRlcmF0aW9ucwA0MDk2AFMAAAAXRGF0ZVN0eWxlAElTTywgTURZAFMAAAAjc3RhbmRhcmRfY29uZm9ybWluZ19zdHJpbmdzAG9uAFMAAAAjc2Vzc2lvbl9hdXRob3JpemF0aW9uAHBvc3RncmVzAFMAAAAZY2xpZW50X2VuY29kaW5nAFVURjgAUwAAADJzZXJ2ZXJfdmVyc2lvbgAxNi4wIChEZWJpYW4gMTYuMC0xLnBnZGcxMjArMSkAUwAAABlzZXJ2ZXJfZW5jb2RpbmcAVVRGOABLAAAADAAAAKvDxr9LWgAAAAVJ
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAADBTRUxFQ1Qgc2V0X2NvbmZpZygnVGltZVpvbmUnLCAnVVRDJywgZmFsc2UpAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAACMAAXNldF9jb25maWcAAAAAAAAAAAAAGf///////wAARAAAAA0AAQAAAANVVENDAAAADVNFTEVDVCAxAFMAAAARVGltZVpvbmUAVVRDAFoAAAAFSQ==
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAK9TRUxFQ1QgImFwcGxpY2F0aW9uX3VzZXIiLiJpZCIsICJhcHBsaWNhdGlvbl91c2VyIi4ibmFtZSIsICJhcHBsaWNhdGlvbl91c2VyIi4iZW1haWwiLCAiYXBwbGljYXRpb25fdXNlciIuInBhc3N3b3JkIiwgImFwcGxpY2F0aW9uX3VzZXIiLiJ3ZWJzaXRlIiBGUk9NICJhcHBsaWNhdGlvbl91c2VyIgA=
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAAH8ABWlkAAAAQJcAAQAAC4YAEP////8AAG5hbWUAAABAlwACAAAEE///AAAANgAAZW1haWwAAABAlwADAAAEE///AAABAgAAcGFzc3dvcmQAAABAlwAEAAAEE///AAAANgAAd2Vic2l0ZQAAAECXAAUAAAQT//8AAAA2AABEAAAAcAAFAAAAJDlmOTMxNjZkLTM4MzMtNDRjMi1iOTA2LWVkZWM5MDE0ZTBkNQAAAAhKb2huIERvZQAAABRqb2huLmRvZUBleGFtcGxlLmNvbQAAAAdqb2huNTY3AAAAD3d3dy5qb2huZG9lLmNvbUMAAAANU0VMRUNUIDEAWgAAAAVJ
----
-version: api.keploy.io/v1beta2
-kind: Postgres
-name: mocks
-spec:
- metadata: {}
- postgresrequests:
- - origin: client
- message:
- - type: binary
- data: UQAAAJNTRUxFQ1QgImRqYW5nb19taWdyYXRpb25zIi4iaWQiLCAiZGphbmdvX21pZ3JhdGlvbnMiLiJhcHAiLCAiZGphbmdvX21pZ3JhdGlvbnMiLiJuYW1lIiwgImRqYW5nb19taWdyYXRpb25zIi4iYXBwbGllZCIgRlJPTSAiZGphbmdvX21pZ3JhdGlvbnMiAA==
- postgresresponses:
- - origin: server
- message:
- - type: binary
- data: VAAAAGIABGlkAAAAQAYAAQAAABQACP////8AAGFwcAAAAEAGAAIAAAQT//8AAAEDAABuYW1lAAAAQAYAAwAABBP//wAAAQMAAGFwcGxpZWQAAABABgAEAAAEoAAI/////wAARAAAAEwABAAAAAExAAAADGNvbnRlbnR0eXBlcwAAAAwwMDAxX2luaXRpYWwAAAAdMjAyMy0wOS0yNyAyMDowMzo0NS43NDczOTQrMDBEAAAARAAEAAAAATIAAAAEYXV0aAAAAAwwMDAxX2luaXRpYWwAAAAdMjAyMy0wOS0yNyAyMDowMzo0NS44MzU2MzErMDBEAAAARQAEAAAAATMAAAAFYWRtaW4AAAAMMDAwMV9pbml0aWFsAAAAHTIwMjMtMDktMjcgMjA6MDM6NDUuODU3OTY5KzAwRAAAAFYABAAAAAE0AAAABWFkbWluAAAAHTAwMDJfbG9nZW50cnlfcmVtb3ZlX2F1dG9fYWRkAAAAHTIwMjMtMDktMjcgMjA6MDM6NDUuODY2OTc1KzAwRAAAAF4ABAAAAAE1AAAABWFkbWluAAAAJTAwMDNfbG9nZW50cnlfYWRkX2FjdGlvbl9mbGFnX2Nob2ljZXMAAAAdMjAyMy0wOS0yNyAyMDowMzo0NS44NzU3OTYrMDBEAAAAXQAEAAAAATYAAAAMY29udGVudHR5cGVzAAAAHTAwMDJfcmVtb3ZlX2NvbnRlbnRfdHlwZV9uYW1lAAAAHTIwMjMtMDktMjcgMjA6MDM6NDUuODk0MDAxKzAwRAAAAFwABAAAAAE3AAAABGF1dGgAAAAlMDAwMl9hbHRlcl9wZXJtaXNzaW9uX25hbWVfbWF4X2xlbmd0aAAAABwyMDIzLTA5LTI3IDIwOjAzOjQ1LjkwNTI4KzAwRAAAAFgABAAAAAE4AAAABGF1dGgAAAAgMDAwM19hbHRlcl91c2VyX2VtYWlsX21heF9sZW5ndGgAAAAdMjAyMy0wOS0yNyAyMDowMzo0NS45MTY0OTQrMDBEAAAAVQAEAAAAATkAAAAEYXV0aAAAAB0wMDA0X2FsdGVyX3VzZXJfdXNlcm5hbWVfb3B0cwAAAB0yMDIzLTA5LTI3IDIwOjAzOjQ1LjkyNTk5NiswMEQAAABXAAQAAAACMTAAAAAEYXV0aAAAAB8wMDA1X2FsdGVyX3VzZXJfbGFzdF9sb2dpbl9udWxsAAAAHDIwMjMtMDktMjcgMjA6MDM6NDUuOTM2NzErMDBEAAAAVwAEAAAAAjExAAAABGF1dGgAAAAeMDAwNl9yZXF1aXJlX2NvbnRlbnR0eXBlc18wMDAyAAAAHTIwMjMtMDktMjcgMjA6MDM6NDUuOTQyNTk2KzAwRAAAAGEABAAAAAIxMgAAAARhdXRoAAAAKDAwMDdfYWx0ZXJfdmFsaWRhdG9yc19hZGRfZXJyb3JfbWVzc2FnZXMAAAAdMjAyMy0wOS0yNyAyMDowMzo0NS45NTI0NjErMDBEAAAAWwAEAAAAAjEzAAAABGF1dGgAAAAjMDAwOF9hbHRlcl91c2VyX3VzZXJuYW1lX21heF9sZW5ndGgAAAAcMjAyMy0wOS0yNyAyMDowMzo0NS45Njg1OCswMEQAAABdAAQAAAACMTQAAAAEYXV0aAAAACQwMDA5X2FsdGVyX3VzZXJfbGFzdF9uYW1lX21heF9sZW5ndGgAAAAdMjAyMy0wOS0yNyAyMDowMzo0NS45ODEyNDIrMDBEAAAAWQAEAAAAAjE1AAAABGF1dGgAAAAgMDAxMF9hbHRlcl9ncm91cF9uYW1lX21heF9sZW5ndGgAAAAdMjAyMy0wOS0yNyAyMDowMzo0NS45OTM1MjUrMDBEAAAAVgAEAAAAAjE2AAAABGF1dGgAAAAdMDAxMV91cGRhdGVfcHJveHlfcGVybWlzc2lvbnMAAAAdMjAyMy0wOS0yNyAyMDowMzo0Ni4wMDkyOTErMDBEAAAAXgAEAAAAAjE3AAAABGF1dGgAAAAlMDAxMl9hbHRlcl91c2VyX2ZpcnN0X25hbWVfbWF4X2xlbmd0aAAAAB0yMDIzLTA5LTI3IDIwOjAzOjQ2LjAyMDk3MyswMEQAAABJAAQAAAACMTgAAAAIc2Vzc2lvbnMAAAAMMDAwMV9pbml0aWFsAAAAHTIwMjMtMDktMjcgMjA6MDM6NDYuMDQxNzg1KzAwRAAAAEwABAAAAAIxOQAAAAthcHBsaWNhdGlvbgAAAAwwMDAxX2luaXRpYWwAAAAdMjAyMy0wOS0yNyAyMDoxNzoxNS43Mzk5MjErMDBDAAAADlNFTEVDVCAxOQBaAAAABUk=
diff --git a/django-postgres/django_postgres/keploy/test-set-0/tests/test-1.yaml b/django-postgres/django_postgres/keploy/test-set-0/tests/test-1.yaml
deleted file mode 100755
index 4accde3..0000000
--- a/django-postgres/django_postgres/keploy/test-set-0/tests/test-1.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-1
-spec:
- metadata: {}
- req:
- method: POST
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Content-Length: "155"
- Content-Type: application/json
- Host: 127.0.0.1:8000
- Postman-Token: 4061c183-e97a-48dd-a92c-4bdfc14d5458
- User-Agent: PostmanRuntime/7.33.0
- body: |4-
- {
- "name": "Jane Smith",
- "email": "jane.smith@example.com",
- "password": "smith567",
- "website": "www.janesmith.com"
- }
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, OPTIONS, POST
- Content-Length: "29"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:39:50 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '{"message": "User Created!!"}'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- objects: []
- assertions:
- noise:
- - header.Date
- - header.Vary
- created: 1695847194
diff --git a/django-postgres/django_postgres/keploy/test-set-0/tests/test-2.yaml b/django-postgres/django_postgres/keploy/test-set-0/tests/test-2.yaml
deleted file mode 100755
index 3ef257c..0000000
--- a/django-postgres/django_postgres/keploy/test-set-0/tests/test-2.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-2
-spec:
- metadata: {}
- req:
- method: GET
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Host: 127.0.0.1:8000
- Postman-Token: e3c0f9f1-1d9d-4b2e-a123-0e5d53174f96
- User-Agent: PostmanRuntime/7.33.0
- body: ""
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, OPTIONS, POST
- Content-Length: "152"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:40:05 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '[{"id":"d78a6260-0077-4f58-b45c-f68b28430400","name":"Jane Smith","email":"jane.smith@example.com","password":"smith567","website":"www.janesmith.com"}]'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- objects: []
- assertions:
- noise:
- - header.Date
- - header.Vary
- created: 1695847209
diff --git a/django-postgres/django_postgres/keploy/test-set-0/tests/test-3.yaml b/django-postgres/django_postgres/keploy/test-set-0/tests/test-3.yaml
deleted file mode 100755
index 27d8d78..0000000
--- a/django-postgres/django_postgres/keploy/test-set-0/tests/test-3.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-3
-spec:
- metadata: {}
- req:
- method: POST
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Content-Length: "148"
- Content-Type: application/json
- Host: 127.0.0.1:8000
- Postman-Token: 88ded5d4-23f2-4dbe-9334-cc59f6756e6c
- User-Agent: PostmanRuntime/7.33.0
- body: |4-
- {
- "name": "John Doe",
- "email": "john.doe@example.com",
- "password": "john567",
- "website": "www.johndoe.com"
- }
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, OPTIONS, POST
- Content-Length: "29"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:40:16 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '{"message": "User Created!!"}'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- objects: []
- assertions:
- noise:
- - header.Vary
- - header.Date
- created: 1695847221
diff --git a/django-postgres/django_postgres/keploy/test-set-0/tests/test-4.yaml b/django-postgres/django_postgres/keploy/test-set-0/tests/test-4.yaml
deleted file mode 100755
index 55c453c..0000000
--- a/django-postgres/django_postgres/keploy/test-set-0/tests/test-4.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-4
-spec:
- metadata: {}
- req:
- method: GET
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/d78a6260-0077-4f58-b45c-f68b28430400/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Host: 127.0.0.1:8000
- Postman-Token: eeea2e51-8485-4cb6-bcc0-f32066b978c4
- User-Agent: PostmanRuntime/7.33.0
- body: ""
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, PUT, OPTIONS, DELETE
- Content-Length: "150"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:40:52 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '{"id":"d78a6260-0077-4f58-b45c-f68b28430400","name":"Jane Smith","email":"jane.smith@example.com","password":"smith567","website":"www.janesmith.com"}'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- objects: []
- assertions:
- noise:
- - header.Date
- - header.Vary
- created: 1695847256
diff --git a/django-postgres/django_postgres/keploy/test-set-0/tests/test-5.yaml b/django-postgres/django_postgres/keploy/test-set-0/tests/test-5.yaml
deleted file mode 100755
index 8bf8ba5..0000000
--- a/django-postgres/django_postgres/keploy/test-set-0/tests/test-5.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-5
-spec:
- metadata: {}
- req:
- method: PUT
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/d78a6260-0077-4f58-b45c-f68b28430400/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Content-Length: "155"
- Content-Type: application/json
- Host: 127.0.0.1:8000
- Postman-Token: 053c8c61-7c7f-4486-afed-98a27c2ce093
- User-Agent: PostmanRuntime/7.33.0
- body: |4-
- {
- "name": "Jane Smith",
- "email": "smith.jane@example.com",
- "password": "smith567",
- "website": "www.smithjane.com"
- }
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, PUT, OPTIONS, DELETE
- Content-Length: "29"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:41:25 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '{"message": "User Updated!!"}'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- objects: []
- assertions:
- noise:
- - header.Vary
- - header.Date
- created: 1695847289
diff --git a/django-postgres/django_postgres/keploy/test-set-0/tests/test-6.yaml b/django-postgres/django_postgres/keploy/test-set-0/tests/test-6.yaml
deleted file mode 100755
index 188c8b1..0000000
--- a/django-postgres/django_postgres/keploy/test-set-0/tests/test-6.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-6
-spec:
- metadata: {}
- req:
- method: DELETE
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/d78a6260-0077-4f58-b45c-f68b28430400/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Host: 127.0.0.1:8000
- Postman-Token: 08c79295-29dc-4245-a31f-7910fbb0d102
- User-Agent: PostmanRuntime/7.33.0
- body: ""
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, PUT, OPTIONS, DELETE
- Content-Length: "29"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:41:45 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '{"message": "User Deleted!!"}'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- objects: []
- assertions:
- noise:
- - header.Date
- - header.Vary
- created: 1695847309
diff --git a/django-postgres/django_postgres/keploy/test-set-0/tests/test-7.yaml b/django-postgres/django_postgres/keploy/test-set-0/tests/test-7.yaml
deleted file mode 100755
index f0a0761..0000000
--- a/django-postgres/django_postgres/keploy/test-set-0/tests/test-7.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-7
-spec:
- metadata: {}
- req:
- method: GET
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Host: 127.0.0.1:8000
- Postman-Token: 2baf2443-5bb2-4133-a83b-ecd40cd4b3d6
- User-Agent: PostmanRuntime/7.33.0
- body: ""
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, OPTIONS, POST
- Content-Length: "145"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:41:50 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '[{"id":"9f93166d-3833-44c2-b906-edec9014e0d5","name":"John Doe","email":"john.doe@example.com","password":"john567","website":"www.johndoe.com"}]'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- objects: []
- assertions:
- noise:
- - header.Vary
- - header.Date
- created: 1695847314
diff --git a/django-postgres/django_postgres/keploy/testReports/report-1.yaml b/django-postgres/django_postgres/keploy/testReports/report-1.yaml
deleted file mode 100755
index dddc1fa..0000000
--- a/django-postgres/django_postgres/keploy/testReports/report-1.yaml
+++ /dev/null
@@ -1,1081 +0,0 @@
-version: api.keploy.io/v1beta1
-name: report-1
-status: FAILED
-success: 4
-failure: 3
-total: 7
-tests:
- - kind: Http
- name: report-1
- status: PASSED
- started: 1695847382
- completed: 1695847382
- test_case_path: /home/shashwat/test/django-postgresql/django_postgres/keploytest-set-0
- mock_path: ""
- test_case_id: test-1
- req:
- method: POST
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Content-Length: "155"
- Content-Type: application/json
- Host: 127.0.0.1:8000
- Postman-Token: 4061c183-e97a-48dd-a92c-4bdfc14d5458
- User-Agent: PostmanRuntime/7.33.0
- body: |4-
- {
- "name": "Jane Smith",
- "email": "jane.smith@example.com",
- "password": "smith567",
- "website": "www.janesmith.com"
- }
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, OPTIONS, POST
- Content-Length: "29"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:39:50 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '{"message": "User Created!!"}'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- noise:
- - header.Date
- - header.Vary
- result:
- status_code:
- normal: true
- expected: 200
- actual: 200
- headers_result:
- - normal: true
- expected:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:39:50 GMT
- actual:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:43:02 GMT
- - normal: true
- expected:
- key: Referrer-Policy
- value:
- - same-origin
- actual:
- key: Referrer-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: X-Content-Type-Options
- value:
- - nosniff
- actual:
- key: X-Content-Type-Options
- value:
- - nosniff
- - normal: true
- expected:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' POST'
- actual:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' POST'
- - normal: true
- expected:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- actual:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- - normal: true
- expected:
- key: X-Frame-Options
- value:
- - DENY
- actual:
- key: X-Frame-Options
- value:
- - DENY
- - normal: true
- expected:
- key: Content-Type
- value:
- - application/json
- actual:
- key: Content-Type
- value:
- - application/json
- - normal: true
- expected:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- actual:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: Vary
- value:
- - Accept, Cookie
- actual:
- key: Vary
- value:
- - Accept, Cookie
- - normal: true
- expected:
- key: Content-Length
- value:
- - "29"
- actual:
- key: Content-Length
- value:
- - "29"
- body_result:
- - normal: true
- type: JSON
- expected: '{"message": "User Created!!"}'
- actual: '{"message": "User Created!!"}'
- dep_result: []
- - kind: Http
- name: report-1
- status: PASSED
- started: 1695847382
- completed: 1695847382
- test_case_path: /home/shashwat/test/django-postgresql/django_postgres/keploytest-set-0
- mock_path: ""
- test_case_id: test-2
- req:
- method: GET
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Host: 127.0.0.1:8000
- Postman-Token: e3c0f9f1-1d9d-4b2e-a123-0e5d53174f96
- User-Agent: PostmanRuntime/7.33.0
- body: ""
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, OPTIONS, POST
- Content-Length: "152"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:40:05 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '[{"id":"d78a6260-0077-4f58-b45c-f68b28430400","name":"Jane Smith","email":"jane.smith@example.com","password":"smith567","website":"www.janesmith.com"}]'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- noise:
- - header.Date
- - header.Vary
- result:
- status_code:
- normal: true
- expected: 200
- actual: 200
- headers_result:
- - normal: true
- expected:
- key: Vary
- value:
- - Accept, Cookie
- actual:
- key: Vary
- value:
- - Accept, Cookie
- - normal: true
- expected:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' POST'
- actual:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' POST'
- - normal: true
- expected:
- key: Content-Length
- value:
- - "152"
- actual:
- key: Content-Length
- value:
- - "152"
- - normal: true
- expected:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- actual:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:40:05 GMT
- actual:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:43:02 GMT
- - normal: true
- expected:
- key: Content-Type
- value:
- - application/json
- actual:
- key: Content-Type
- value:
- - application/json
- - normal: true
- expected:
- key: Referrer-Policy
- value:
- - same-origin
- actual:
- key: Referrer-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: X-Frame-Options
- value:
- - DENY
- actual:
- key: X-Frame-Options
- value:
- - DENY
- - normal: true
- expected:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- actual:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- - normal: true
- expected:
- key: X-Content-Type-Options
- value:
- - nosniff
- actual:
- key: X-Content-Type-Options
- value:
- - nosniff
- body_result:
- - normal: true
- type: JSON
- expected: '[{"id":"d78a6260-0077-4f58-b45c-f68b28430400","name":"Jane Smith","email":"jane.smith@example.com","password":"smith567","website":"www.janesmith.com"}]'
- actual: '[{"id":"d78a6260-0077-4f58-b45c-f68b28430400","name":"Jane Smith","email":"jane.smith@example.com","password":"smith567","website":"www.janesmith.com"}]'
- dep_result: []
- - kind: Http
- name: report-1
- status: PASSED
- started: 1695847382
- completed: 1695847382
- test_case_path: /home/shashwat/test/django-postgresql/django_postgres/keploytest-set-0
- mock_path: ""
- test_case_id: test-3
- req:
- method: POST
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Content-Length: "148"
- Content-Type: application/json
- Host: 127.0.0.1:8000
- Postman-Token: 88ded5d4-23f2-4dbe-9334-cc59f6756e6c
- User-Agent: PostmanRuntime/7.33.0
- body: |4-
- {
- "name": "John Doe",
- "email": "john.doe@example.com",
- "password": "john567",
- "website": "www.johndoe.com"
- }
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, OPTIONS, POST
- Content-Length: "29"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:40:16 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '{"message": "User Created!!"}'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- noise:
- - header.Vary
- - header.Date
- result:
- status_code:
- normal: true
- expected: 200
- actual: 200
- headers_result:
- - normal: true
- expected:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- actual:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- actual:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- - normal: true
- expected:
- key: Vary
- value:
- - Accept, Cookie
- actual:
- key: Vary
- value:
- - Accept, Cookie
- - normal: true
- expected:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' POST'
- actual:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' POST'
- - normal: true
- expected:
- key: Referrer-Policy
- value:
- - same-origin
- actual:
- key: Referrer-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: Content-Length
- value:
- - "29"
- actual:
- key: Content-Length
- value:
- - "29"
- - normal: true
- expected:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:40:16 GMT
- actual:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:43:02 GMT
- - normal: true
- expected:
- key: Content-Type
- value:
- - application/json
- actual:
- key: Content-Type
- value:
- - application/json
- - normal: true
- expected:
- key: X-Frame-Options
- value:
- - DENY
- actual:
- key: X-Frame-Options
- value:
- - DENY
- - normal: true
- expected:
- key: X-Content-Type-Options
- value:
- - nosniff
- actual:
- key: X-Content-Type-Options
- value:
- - nosniff
- body_result:
- - normal: true
- type: JSON
- expected: '{"message": "User Created!!"}'
- actual: '{"message": "User Created!!"}'
- dep_result: []
- - kind: Http
- name: report-1
- status: FAILED
- started: 1695847382
- completed: 1695847382
- test_case_path: /home/shashwat/test/django-postgresql/django_postgres/keploytest-set-0
- mock_path: ""
- test_case_id: test-4
- req:
- method: GET
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/d78a6260-0077-4f58-b45c-f68b28430400/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Host: 127.0.0.1:8000
- Postman-Token: eeea2e51-8485-4cb6-bcc0-f32066b978c4
- User-Agent: PostmanRuntime/7.33.0
- body: ""
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, PUT, OPTIONS, DELETE
- Content-Length: "150"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:40:52 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '{"id":"d78a6260-0077-4f58-b45c-f68b28430400","name":"Jane Smith","email":"jane.smith@example.com","password":"smith567","website":"www.janesmith.com"}'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- noise:
- - header.Date
- - header.Vary
- result:
- status_code:
- normal: true
- expected: 200
- actual: 200
- headers_result:
- - normal: true
- expected:
- key: Content-Length
- value:
- - "150"
- actual:
- key: Content-Length
- value:
- - "150"
- - normal: true
- expected:
- key: Vary
- value:
- - Accept, Cookie
- actual:
- key: Vary
- value:
- - Accept, Cookie
- - normal: true
- expected:
- key: Content-Type
- value:
- - application/json
- actual:
- key: Content-Type
- value:
- - application/json
- - normal: true
- expected:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:40:52 GMT
- actual:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:43:02 GMT
- - normal: true
- expected:
- key: Referrer-Policy
- value:
- - same-origin
- actual:
- key: Referrer-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- actual:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- - normal: true
- expected:
- key: X-Frame-Options
- value:
- - DENY
- actual:
- key: X-Frame-Options
- value:
- - DENY
- - normal: true
- expected:
- key: X-Content-Type-Options
- value:
- - nosniff
- actual:
- key: X-Content-Type-Options
- value:
- - nosniff
- - normal: false
- expected:
- key: Allow
- value:
- - GET
- - ' PUT'
- - ' OPTIONS'
- - ' DELETE'
- actual:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' PUT'
- - ' DELETE'
- - normal: true
- expected:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- actual:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- body_result:
- - normal: true
- type: JSON
- expected: '{"id":"d78a6260-0077-4f58-b45c-f68b28430400","name":"Jane Smith","email":"jane.smith@example.com","password":"smith567","website":"www.janesmith.com"}'
- actual: '{"id":"d78a6260-0077-4f58-b45c-f68b28430400","name":"Jane Smith","email":"jane.smith@example.com","password":"smith567","website":"www.janesmith.com"}'
- dep_result: []
- - kind: Http
- name: report-1
- status: FAILED
- started: 1695847382
- completed: 1695847382
- test_case_path: /home/shashwat/test/django-postgresql/django_postgres/keploytest-set-0
- mock_path: ""
- test_case_id: test-5
- req:
- method: PUT
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/d78a6260-0077-4f58-b45c-f68b28430400/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Content-Length: "155"
- Content-Type: application/json
- Host: 127.0.0.1:8000
- Postman-Token: 053c8c61-7c7f-4486-afed-98a27c2ce093
- User-Agent: PostmanRuntime/7.33.0
- body: |4-
- {
- "name": "Jane Smith",
- "email": "smith.jane@example.com",
- "password": "smith567",
- "website": "www.smithjane.com"
- }
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, PUT, OPTIONS, DELETE
- Content-Length: "29"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:41:25 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '{"message": "User Updated!!"}'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- noise:
- - header.Vary
- - header.Date
- result:
- status_code:
- normal: true
- expected: 200
- actual: 200
- headers_result:
- - normal: false
- expected:
- key: Allow
- value:
- - GET
- - ' PUT'
- - ' OPTIONS'
- - ' DELETE'
- actual:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' PUT'
- - ' DELETE'
- - normal: true
- expected:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- actual:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- - normal: true
- expected:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:41:25 GMT
- actual:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:43:02 GMT
- - normal: true
- expected:
- key: Vary
- value:
- - Accept, Cookie
- actual:
- key: Vary
- value:
- - Accept, Cookie
- - normal: true
- expected:
- key: X-Frame-Options
- value:
- - DENY
- actual:
- key: X-Frame-Options
- value:
- - DENY
- - normal: true
- expected:
- key: Referrer-Policy
- value:
- - same-origin
- actual:
- key: Referrer-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: X-Content-Type-Options
- value:
- - nosniff
- actual:
- key: X-Content-Type-Options
- value:
- - nosniff
- - normal: true
- expected:
- key: Content-Length
- value:
- - "29"
- actual:
- key: Content-Length
- value:
- - "29"
- - normal: true
- expected:
- key: Content-Type
- value:
- - application/json
- actual:
- key: Content-Type
- value:
- - application/json
- - normal: true
- expected:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- actual:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- body_result:
- - normal: true
- type: JSON
- expected: '{"message": "User Updated!!"}'
- actual: '{"message": "User Updated!!"}'
- dep_result: []
- - kind: Http
- name: report-1
- status: FAILED
- started: 1695847382
- completed: 1695847383
- test_case_path: /home/shashwat/test/django-postgresql/django_postgres/keploytest-set-0
- mock_path: ""
- test_case_id: test-6
- req:
- method: DELETE
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/d78a6260-0077-4f58-b45c-f68b28430400/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Host: 127.0.0.1:8000
- Postman-Token: 08c79295-29dc-4245-a31f-7910fbb0d102
- User-Agent: PostmanRuntime/7.33.0
- body: ""
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, PUT, OPTIONS, DELETE
- Content-Length: "29"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:41:45 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '{"message": "User Deleted!!"}'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- noise:
- - header.Date
- - header.Vary
- result:
- status_code:
- normal: true
- expected: 200
- actual: 200
- headers_result:
- - normal: true
- expected:
- key: Referrer-Policy
- value:
- - same-origin
- actual:
- key: Referrer-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: X-Frame-Options
- value:
- - DENY
- actual:
- key: X-Frame-Options
- value:
- - DENY
- - normal: true
- expected:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- actual:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:41:45 GMT
- actual:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:43:03 GMT
- - normal: false
- expected:
- key: Allow
- value:
- - GET
- - ' PUT'
- - ' OPTIONS'
- - ' DELETE'
- actual:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' PUT'
- - ' DELETE'
- - normal: true
- expected:
- key: Content-Length
- value:
- - "29"
- actual:
- key: Content-Length
- value:
- - "29"
- - normal: true
- expected:
- key: Content-Type
- value:
- - application/json
- actual:
- key: Content-Type
- value:
- - application/json
- - normal: true
- expected:
- key: Vary
- value:
- - Accept, Cookie
- actual:
- key: Vary
- value:
- - Accept, Cookie
- - normal: true
- expected:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- actual:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- - normal: true
- expected:
- key: X-Content-Type-Options
- value:
- - nosniff
- actual:
- key: X-Content-Type-Options
- value:
- - nosniff
- body_result:
- - normal: true
- type: JSON
- expected: '{"message": "User Deleted!!"}'
- actual: '{"message": "User Deleted!!"}'
- dep_result: []
- - kind: Http
- name: report-1
- status: PASSED
- started: 1695847383
- completed: 1695847383
- test_case_path: /home/shashwat/test/django-postgresql/django_postgres/keploytest-set-0
- mock_path: ""
- test_case_id: test-7
- req:
- method: GET
- proto_major: 1
- proto_minor: 1
- url: http://127.0.0.1:8000/user/
- header:
- Accept: '*/*'
- Accept-Encoding: gzip, deflate, br
- Connection: keep-alive
- Host: 127.0.0.1:8000
- Postman-Token: 2baf2443-5bb2-4133-a83b-ecd40cd4b3d6
- User-Agent: PostmanRuntime/7.33.0
- body: ""
- body_type: ""
- resp:
- status_code: 200
- header:
- Allow: GET, OPTIONS, POST
- Content-Length: "145"
- Content-Type: application/json
- Cross-Origin-Opener-Policy: same-origin
- Date: Wed, 27 Sep 2023 20:41:50 GMT
- Referrer-Policy: same-origin
- Server: WSGIServer/0.2 CPython/3.10.12
- Vary: Accept, Cookie
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- body: '[{"id":"9f93166d-3833-44c2-b906-edec9014e0d5","name":"John Doe","email":"john.doe@example.com","password":"john567","website":"www.johndoe.com"}]'
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- noise:
- - header.Vary
- - header.Date
- result:
- status_code:
- normal: true
- expected: 200
- actual: 200
- headers_result:
- - normal: true
- expected:
- key: X-Content-Type-Options
- value:
- - nosniff
- actual:
- key: X-Content-Type-Options
- value:
- - nosniff
- - normal: true
- expected:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' POST'
- actual:
- key: Allow
- value:
- - GET
- - ' OPTIONS'
- - ' POST'
- - normal: true
- expected:
- key: Content-Length
- value:
- - "145"
- actual:
- key: Content-Length
- value:
- - "145"
- - normal: true
- expected:
- key: Referrer-Policy
- value:
- - same-origin
- actual:
- key: Referrer-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: Vary
- value:
- - Accept, Cookie
- actual:
- key: Vary
- value:
- - Accept, Cookie
- - normal: true
- expected:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:41:50 GMT
- actual:
- key: Date
- value:
- - Wed, 27 Sep 2023 20:43:03 GMT
- - normal: true
- expected:
- key: X-Frame-Options
- value:
- - DENY
- actual:
- key: X-Frame-Options
- value:
- - DENY
- - normal: true
- expected:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- actual:
- key: Cross-Origin-Opener-Policy
- value:
- - same-origin
- - normal: true
- expected:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- actual:
- key: Server
- value:
- - WSGIServer/0.2 CPython/3.10.12
- - normal: true
- expected:
- key: Content-Type
- value:
- - application/json
- actual:
- key: Content-Type
- value:
- - application/json
- body_result:
- - normal: true
- type: JSON
- expected: '[{"id":"9f93166d-3833-44c2-b906-edec9014e0d5","name":"John Doe","email":"john.doe@example.com","password":"john567","website":"www.johndoe.com"}]'
- actual: '[{"id":"9f93166d-3833-44c2-b906-edec9014e0d5","name":"John Doe","email":"john.doe@example.com","password":"john567","website":"www.johndoe.com"}]'
- dep_result: []
-test_set: test-set-0
diff --git a/django-postgres/django_postgres/requirements.txt b/django-postgres/django_postgres/requirements.txt
index eb2fff9..50399bc 100644
--- a/django-postgres/django_postgres/requirements.txt
+++ b/django-postgres/django_postgres/requirements.txt
@@ -1,4 +1,9 @@
-django==4.2.3
-django_rest_framework==0.1.0
-psycopg2-binary==2.9.6
-psycopg2>=2.7,<3.0
\ No newline at end of file
+asgiref==3.7.2
+Django==4.2.9
+djangorestframework==3.14.0
+psycopg==3.1.17
+psycopg2-binary==2.9.9
+pytz==2023.3.post1
+sqlparse==0.4.4
+typing_extensions==4.9.0
+coverage==7.6.1
diff --git a/fastapi-postgres/.gitignore b/fastapi-postgres/.gitignore
new file mode 100644
index 0000000..78a1f19
--- /dev/null
+++ b/fastapi-postgres/.gitignore
@@ -0,0 +1,2 @@
+venv
+application/__pycache__
\ No newline at end of file
diff --git a/fastapi-postgres/Dockerfile b/fastapi-postgres/Dockerfile
new file mode 100644
index 0000000..85a9796
--- /dev/null
+++ b/fastapi-postgres/Dockerfile
@@ -0,0 +1,34 @@
+# Use the official Python image as the base image
+FROM python:3.11.5-bullseye
+
+# Install PostgreSQL client
+RUN apt-get update \
+ && apt-get install -y --no-install-recommends \
+ postgresql-client \
+ curl \
+ netcat-traditional
+
+# Set the working directory to /app
+WORKDIR /app
+
+# Copy the requirements file into the container
+COPY requirements.txt .
+
+# Install the dependencies
+RUN pip install --no-cache-dir -r requirements.txt
+
+# Copy the rest of the application code into the container
+COPY . .
+
+# Set environment variables for PostgreSQL
+# ENV POSTGRES_USER=postgres \
+# POSTGRES_PASSWORD=postgres \
+# POSTGRES_DB=studentdb \
+# POSTGRES_HOST=0.0.0.0 \
+# POSTGRES_PORT=5432
+
+# Expose port 80 for the FastAPI application
+EXPOSE 8000
+
+# Start the FastAPI application
+CMD [ "/app/entrypoint.sh" ]
diff --git a/fastapi-postgres/README.md b/fastapi-postgres/README.md
new file mode 100644
index 0000000..56fd7e2
--- /dev/null
+++ b/fastapi-postgres/README.md
@@ -0,0 +1,121 @@
+# FastAPI-Postgres CRUD Application
+
+A sample user data CRUD app to test Keploy integration capabilities using [FastAPI](https://fastapi.tiangolo.com/) and [PostgreSQL](https://www.postgresql.org/).
+Make the following requests to the respective endpoints -
+
+1. `GET students/` - Get all students.
+2. `GET students/{id}` - Get a student by id.
+3. `POST students/` - Create a student.
+4. `PUT students/{id}` - Update a student by id.
+5. `DELETE students/{id}` - Delete a student by id.
+
+## Installation Setup
+
+```bash
+git clone https://github.com/keploy/samples-python.git && cd samples-python/fastapi-postgres
+pip3 install coverage
+pip3 install -r requirements.txt
+```
+
+## Installation Keploy
+
+Keploy can be installed on Linux directly and on Windows with the help of WSL. Based on your system architecture, install the keploy latest binary release
+
+```bash
+curl -O -L https:///keploy.io/install.sh && source install.sh
+```
+
+### Starting the PostgreSQL Instance
+
+```bash
+# Start the application
+docker-compose up -d postgres
+```
+
+> **If we have setup our sample-app with docker, we need to update the container name to postgres on line 6, in `application/database.py`, from `postgresql://postgres:postgres@localhost:5432/studentdb` to `postgresql://postgres:postgres@postgres:5432/studentdb`.**
+
+> **Also, we need to update the container name to postgres on line 11, of `application/main.py`, from `postgresql://postgres:postgres@localhost:5432/studentdb` to `postgresql://postgres:postgres@postgres:5432/studentdb`.**
+
+### Capture the Testcases
+
+This command will start the recording of API calls :
+
+```sh
+sudo -E PATH=$PATH keploy record -c "uvicorn application.main:app --reload"
+```
+
+Make API Calls using Hoppscotch, Postman or cURL command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
+
+### Make a POST request
+
+```bash
+curl --location 'http://127.0.0.1:8000/students/' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "name": "Eva White",
+ "email": "evawhite@example.com",
+ "password": "evawhite111"
+ }'
+```
+
+```bash
+curl --location 'http://127.0.0.1:8000/students/' \
+--header 'Content-Type: application/json' \
+--data-raw ' {
+ "name": "John Doe",
+ "email": "johndoe@example.com",
+ "password": "johndoe123"
+ }'
+```
+
+### Make a GET request to get all the data
+
+```bash
+curl --location 'http://127.0.0.1:8000/students/'
+```
+
+This will return all the data saved in the database.
+
+### Make a GET request to get a specific data
+
+```bash
+curl --location 'http://127.0.0.1:8000/students/1'
+```
+
+### Make a PUT request to update a specific data
+
+```bash
+curl --location --request PUT 'http://127.0.0.1:8000/students/2' \
+--header 'Content-Type: application/json' \
+--data-raw ' {
+ "name": "John Dow",
+ "email": "doe.john@example.com",
+ "password": "johndoe123",
+ "stream": "Arts"
+ }'
+```
+
+### Make a DELETE request to delete a specific data
+
+```bash
+curl --location --request DELETE 'http://127.0.0.1:8000/students/1'
+```
+
+Now all these API calls were captured as **editable** testcases and written to `keploy/tests` folder. The keploy directory would also have `mocks` file that contains all the outputs of postgres operations.
+
+
+
+## Run the Testcases
+
+Now let's run the application in test mode.
+
+```shell
+sudo -E PATH=$PATH keploy test -c "python3 -m uvicorn application.main:app" --delay 10
+```
+We will get output something like below -
+
+
+
+By making just 2 api call, we have generated a complete test suite for our application and acheived 72% coverage.
+
+So, no need to setup fake database/apis like Postgres or write mocks for them. Keploy automatically mocks them and, **The application thinks it's talking to Postgres 😄**
diff --git a/fastapi-postgres/application/__init__.py b/fastapi-postgres/application/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/fastapi-postgres/application/crud.py b/fastapi-postgres/application/crud.py
new file mode 100644
index 0000000..ae0411e
--- /dev/null
+++ b/fastapi-postgres/application/crud.py
@@ -0,0 +1,52 @@
+from sqlalchemy.orm import Session
+from . import models, schemas
+
+
+def get_student(db: Session, student_id: int):
+ return db.query(models.Student).filter(models.Student.id == student_id).first()
+
+
+def get_student_byEmail(db: Session, student_email: str):
+ return db.query(models.Student).filter(models.Student.email == student_email).first()
+
+
+def get_students(db: Session, skip: int = 0, limit: int = 50):
+ return db.query(models.Student).offset(skip).limit(limit).all()
+
+
+def create_student(db: Session, student: schemas.StudentCreate):
+ student_hashed_password = password_hasher(student.password)
+
+ db_student = models.Student(name=student.name, email=student.email, password=student_hashed_password)
+ db.add(db_student)
+ db.commit()
+ db.refresh(db_student)
+ return db_student
+
+
+def update_student(db: Session, student: schemas.StudentUpdate, student_id: int):
+ student_old = db.query(models.Student).filter(models.Student.id == student_id).first()
+ if student_old is None:
+ return None
+ student_old.name = student_old.name if student.name is None else student.name
+ student_old.email = student_old.email if student.email is None else student.email
+ student_old.stream = student_old.stream if student.stream is None else student.stream
+ student_old.password = password_hasher(student.password)
+ db.commit()
+ db.refresh(student_old)
+ return student_old
+
+
+def delete_student(db: Session, student_id: int):
+ student = db.query(models.Student).filter(models.Student.id == student_id).first()
+ if student:
+ db.delete(student)
+ db.commit()
+ return student
+
+
+def password_hasher(password) -> str:
+ hashed_password = 's'
+ for i in range(0, len(password)):
+ hashed_password += chr(ord(password[i]) + 1)
+ return hashed_password
diff --git a/fastapi-postgres/application/database.py b/fastapi-postgres/application/database.py
new file mode 100644
index 0000000..17e68c4
--- /dev/null
+++ b/fastapi-postgres/application/database.py
@@ -0,0 +1,11 @@
+from sqlalchemy import create_engine
+from sqlalchemy.ext.declarative import declarative_base
+from sqlalchemy.orm import sessionmaker
+
+
+SQLALCHEMY_DATABASE_URL = "postgresql://postgres:postgres@localhost:5432/studentdb"
+
+engine = create_engine(SQLALCHEMY_DATABASE_URL)
+SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
+
+Base = declarative_base()
\ No newline at end of file
diff --git a/fastapi-postgres/application/main.py b/fastapi-postgres/application/main.py
new file mode 100644
index 0000000..c078fe2
--- /dev/null
+++ b/fastapi-postgres/application/main.py
@@ -0,0 +1,70 @@
+from fastapi import Depends, FastAPI, HTTPException
+from sqlalchemy.orm import Session
+from sqlalchemy import create_engine
+from sqlalchemy.orm import sessionmaker
+from sqlalchemy.ext.declarative import declarative_base
+import asyncio
+
+from . import models, crud, schemas
+
+# Database setup
+SQLALCHEMY_DATABASE_URL = "postgresql://postgres:postgres@localhost:5432/studentdb"
+engine = create_engine(SQLALCHEMY_DATABASE_URL)
+SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
+Base = declarative_base()
+models.Base.metadata.create_all(bind=engine)
+
+app = FastAPI()
+
+# Dependency
+def get_db():
+ db = SessionLocal()
+ try:
+ yield db
+ finally:
+ db.close()
+
+@app.post('/students/', response_model=schemas.Student)
+def create_student(student: schemas.StudentCreate, db: Session = Depends(get_db)):
+ db_student = crud.get_student_byEmail(db, student_email=student.email)
+ if db_student:
+ raise HTTPException(status_code=400, detail="Student already registered!!")
+ data = crud.create_student(db, student=student)
+ return data
+
+@app.get('/students/', response_model=list[schemas.Student])
+def read_students(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)):
+ students = crud.get_students(db, skip, limit)
+ if students == []:
+ raise HTTPException(404, 'Data not found!!')
+ return students
+
+@app.get('/students/{student_id}', response_model=schemas.Student)
+def read_student(student_id: int, db: Session = Depends(get_db)):
+ student = crud.get_student(db, student_id=student_id)
+ if student is None:
+ raise HTTPException(status_code=404, detail=f'Student with ID={student_id} not found!!')
+ return student
+
+@app.put('/students/{student_id}', response_model=schemas.Student)
+def update_student(student_id: int, student: schemas.StudentUpdate, db: Session = Depends(get_db)):
+ student = crud.update_student(db, student=student, student_id=student_id)
+ if student is None:
+ raise HTTPException(status_code=404, detail=f'Student with ID={student_id} not found!!')
+ return student
+
+@app.delete('/students/{student_id}', response_model=schemas.Student)
+def delete_student(student_id: int, db: Session = Depends(get_db)):
+ student = crud.delete_student(db, student_id=student_id)
+ if student is None:
+ raise HTTPException(status_code=404, detail=f'Student with ID={student_id} not found!!')
+ return student
+
+# Graceful shutdown
+@app.on_event("shutdown")
+async def shutdown_event():
+ # Example: Close the database connection pool
+ print("Shutting down...")
+ # Assuming SQLAlchemy engine has a dispose method to release resources
+ engine.dispose()
+
diff --git a/fastapi-postgres/application/models.py b/fastapi-postgres/application/models.py
new file mode 100644
index 0000000..05dd1eb
--- /dev/null
+++ b/fastapi-postgres/application/models.py
@@ -0,0 +1,13 @@
+from sqlalchemy import Integer, String, Column
+
+from .database import Base
+
+
+class Student(Base):
+ __tablename__="students"
+
+ id = Column(Integer, name="ID", primary_key=True, index=True, info="Stores the id of a student", autoincrement="auto")
+ name = Column(String, name="Name")
+ email = Column(String, name="Email", index=True)
+ password = Column(String, name="Hashed Password")
+ stream = Column(String, name="Subject Stream", default="Mathematics")
diff --git a/fastapi-postgres/application/schemas.py b/fastapi-postgres/application/schemas.py
new file mode 100644
index 0000000..2935dcb
--- /dev/null
+++ b/fastapi-postgres/application/schemas.py
@@ -0,0 +1,24 @@
+from pydantic import BaseModel
+
+
+class StudentBase(BaseModel):
+ name: str
+ email: str
+
+
+class StudentCreate(StudentBase):
+ password: str
+
+
+class StudentUpdate(StudentCreate):
+ stream: str
+
+ class Config:
+ from_attributes = True
+
+
+class Student(StudentUpdate):
+ id: int
+
+ class Config:
+ from_attributes = True
diff --git a/fastapi-postgres/application/test_crud.py b/fastapi-postgres/application/test_crud.py
new file mode 100644
index 0000000..b33d4c8
--- /dev/null
+++ b/fastapi-postgres/application/test_crud.py
@@ -0,0 +1,55 @@
+import pytest
+from sqlalchemy import create_engine
+from sqlalchemy.orm import sessionmaker
+
+from .database import Base, SessionLocal
+from . import crud, models, schemas
+
+# Create an in-memory SQLite database for testing
+SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db"
+engine = create_engine(SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False})
+TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
+
+# Create the database tables
+Base.metadata.create_all(bind=engine)
+
+@pytest.fixture(scope="module")
+def db_session():
+ connection = engine.connect()
+ transaction = connection.begin()
+ session = TestingSessionLocal(bind=connection)
+
+ yield session
+
+ session.close()
+ transaction.rollback()
+ connection.close()
+
+def test_create_student(db_session):
+ student_in = schemas.StudentCreate(name="John Doe", email="john.doe@example.com", password="password", stream="Science")
+ student = crud.create_student(db_session, student_in)
+ assert student.name == "John Doe"
+ assert student.email == "john.doe@example.com"
+
+def test_get_student(db_session):
+ student_in = schemas.StudentCreate(name="Jane Doe", email="jane.doe@example.com", password="password", stream="Arts")
+ student = crud.create_student(db_session, student_in)
+ fetched_student = crud.get_student(db_session, student.id)
+ assert fetched_student.name == "Jane Doe"
+ assert fetched_student.email == "jane.doe@example.com"
+
+def test_update_student(db_session):
+ student_in = schemas.StudentCreate(name="Jim Beam", email="jim.beam@example.com", password="password", stream="Commerce")
+ student = crud.create_student(db_session, student_in)
+ student_update = schemas.StudentUpdate(name="Jim Updated", email="jim.updated@example.com", password="newpassword", stream="Commerce")
+ updated_student = crud.update_student(db_session, student_update, student.id)
+ assert updated_student.name == "Jim Updated"
+ assert updated_student.email == "jim.updated@example.com"
+
+def test_delete_student(db_session):
+ student_in = schemas.StudentCreate(name="Will Smith", email="will.smith@example.com", password="password", stream="Engineering")
+ student = crud.create_student(db_session, student_in)
+ deleted_student = crud.delete_student(db_session, student.id)
+ assert deleted_student is not None
+ assert deleted_student.name == "Will Smith"
+ assert crud.get_student(db_session, student.id) is None
diff --git a/fastapi-postgres/data.json b/fastapi-postgres/data.json
new file mode 100644
index 0000000..629467e
--- /dev/null
+++ b/fastapi-postgres/data.json
@@ -0,0 +1,53 @@
+[
+ {
+ "name": "John Doe",
+ "email": "johndoe@example.com",
+ "password": "johndoe123"
+ },
+ {
+ "name": "Alice Smith",
+ "email": "alicesmith@example.com",
+ "password": "alicesmith789"
+ },
+ {
+ "name": "Bob Johnson",
+ "email": "bobjohnson@example.com",
+ "password": "bobjohnson456"
+ },
+ {
+ "name": "Eva White",
+ "email": "evawhite@example.com",
+ "password": "evawhite111"
+ },
+ {
+ "name": "Michael Brown",
+ "email": "michaelbrown@example.com",
+ "password": "michaelbrown999"
+ },
+ {
+ "name": "Sophia Lee",
+ "email": "sophialee@example.com",
+ "password": "sophialee777"
+ },
+ {
+ "name": "David Hall",
+ "email": "davidhall@example.com",
+ "password": "davidhall222"
+ },
+ {
+ "name": "Emma Turner",
+ "email": "emmaturner@example.com",
+ "password": "emmaturner654"
+ },
+ {
+ "name": "Oliver Harris",
+ "email": "oliverharris@example.com",
+ "password": "oliverharris333"
+ },
+ {
+ "name": "Ava Martinez",
+ "email": "avamartinez@example.com",
+ "password": "avamartinez888"
+ }
+ ]
+
\ No newline at end of file
diff --git a/fastapi-postgres/docker-compose.yml b/fastapi-postgres/docker-compose.yml
new file mode 100644
index 0000000..fd49830
--- /dev/null
+++ b/fastapi-postgres/docker-compose.yml
@@ -0,0 +1,34 @@
+version: '3.9'
+services:
+
+ postgres:
+ image: postgres:latest
+ container_name: postgres
+ environment:
+ POSTGRES_DB: studentdb
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: postgres
+ ports:
+ - "5432:5432" # Map the PostgreSQL port to the host machine
+ volumes:
+ - ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql
+ networks:
+ - keploy-network
+
+ app:
+ container_name: fastapi-app
+ image: fastapi
+ build:
+ context: .
+ dockerfile: Dockerfile
+ restart: unless-stopped
+ ports:
+ - 8000:8000
+ depends_on:
+ - postgres
+ networks:
+ - keploy-network
+
+networks:
+ keploy-network:
+ external: true
diff --git a/fastapi-postgres/entrypoint.sh b/fastapi-postgres/entrypoint.sh
new file mode 100755
index 0000000..0c46028
--- /dev/null
+++ b/fastapi-postgres/entrypoint.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+until nc -z -v -w30 postgres 5432
+do
+ echo "Waiting for database connection..."
+ # wait for 5 seconds before check again
+ sleep 5
+done
+
+uvicorn application.main:app --host 0.0.0.0 --port 8000
diff --git a/fastapi-postgres/img/testcases.png b/fastapi-postgres/img/testcases.png
new file mode 100644
index 0000000..1c4a2f0
Binary files /dev/null and b/fastapi-postgres/img/testcases.png differ
diff --git a/fastapi-postgres/img/testrun.png b/fastapi-postgres/img/testrun.png
new file mode 100644
index 0000000..11029fc
Binary files /dev/null and b/fastapi-postgres/img/testrun.png differ
diff --git a/fastapi-postgres/keploy.yml b/fastapi-postgres/keploy.yml
new file mode 100755
index 0000000..d6e6628
--- /dev/null
+++ b/fastapi-postgres/keploy.yml
@@ -0,0 +1,43 @@
+path: ""
+appId: 0
+appName: ""
+command: uvicorn application.main:app --reload
+port: 0
+dnsPort: 26789
+proxyPort: 16789
+debug: false
+disableTele: false
+disableANSI: false
+containerName: ""
+networkName: ""
+buildDelay: 30
+test:
+ selectedTests: {}
+ globalNoise:
+ global: {}
+ test-sets: {}
+ delay: 5
+ apiTimeout: 5
+ skipCoverage: false
+ coverageReportPath: ""
+ ignoreOrdering: true
+ mongoPassword: default@123
+ language: ""
+ removeUnusedMocks: false
+ fallBackOnMiss: false
+ jacocoAgentPath: ""
+ basePath: ""
+ mocking: true
+ ignoredTests: {}
+record:
+ filters: []
+ recordTimer: 0s
+configPath: ""
+bypassRules: []
+generateGithubActions: true
+keployContainer: keploy-v2
+keployNetwork: keploy-network
+cmdType: native
+inCi: false
+
+# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
diff --git a/fastapi-postgres/requirements.txt b/fastapi-postgres/requirements.txt
new file mode 100644
index 0000000..c7ad5e0
--- /dev/null
+++ b/fastapi-postgres/requirements.txt
@@ -0,0 +1,35 @@
+annotated-types==0.6.0
+anyio==3.7.1
+certifi==2023.7.22
+click==8.1.7
+dnspython==2.4.2
+email-validator==2.0.0.post2
+exceptiongroup==1.1.3
+fastapi==0.103.2
+greenlet==3.0.0
+h11==0.14.0
+httpcore==0.18.0
+httptools==0.6.0
+httpx==0.25.0
+idna==3.4
+itsdangerous==2.1.2
+Jinja2==3.1.2
+MarkupSafe==2.1.3
+orjson==3.9.8
+psycopg2-binary==2.9.9
+pydantic==2.4.2
+pydantic-extra-types==2.1.0
+pydantic-settings==2.0.3
+pydantic_core==2.10.1
+python-dotenv==1.0.0
+python-multipart==0.0.6
+PyYAML==6.0.1
+sniffio==1.3.0
+SQLAlchemy==2.0.21
+starlette==0.27.0
+typing_extensions==4.8.0
+ujson==5.8.0
+uvicorn==0.23.2
+uvloop==0.17.0
+watchfiles==0.20.0
+websockets==11.0.3
diff --git a/fastapi-postgres/sql/init.sql b/fastapi-postgres/sql/init.sql
new file mode 100644
index 0000000..c42858b
--- /dev/null
+++ b/fastapi-postgres/sql/init.sql
@@ -0,0 +1,2 @@
+CREATE DATABASE studentdb;
+DROP DATABASE IF EXISTS studentdb;
\ No newline at end of file
diff --git a/fastapi-twilio/.gitignore b/fastapi-twilio/.gitignore
new file mode 100644
index 0000000..04a54bd
--- /dev/null
+++ b/fastapi-twilio/.gitignore
@@ -0,0 +1,2 @@
+./venv
+./__pycache__.env
diff --git a/fastapi-twilio/Dockerfile b/fastapi-twilio/Dockerfile
new file mode 100644
index 0000000..e8aa5dd
--- /dev/null
+++ b/fastapi-twilio/Dockerfile
@@ -0,0 +1,11 @@
+FROM python:3.11.5-bullseye
+
+WORKDIR /app
+
+COPY . /app/
+
+RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
+
+EXPOSE 8000
+
+CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
diff --git a/fastapi-twilio/README.md b/fastapi-twilio/README.md
new file mode 100644
index 0000000..d1d5ca9
--- /dev/null
+++ b/fastapi-twilio/README.md
@@ -0,0 +1,72 @@
+# FastAPI-Twilio Application
+
+A sample FastAPI-Twilio app to test Keploy integration capabilities using [FastAPI](https://fastapi.tiangolo.com/) and [Twilio](https://www.twilio.com/en-us).
+
+## Installation Setup
+
+```bash
+git clone https://github.com/keploy/samples-python.git && cd samples-python/fastapi-twilio
+pip3 install coverage
+pip3 install -r requirements.txt
+```
+
+## Installation Keploy
+
+Keploy can be installed on Linux directly and on Windows with the help of WSL. Based on your system architecture, install the keploy latest binary release
+
+```bash
+curl -O https://keploy.io/install.sh && source install.sh
+```
+
+### Get your Twilio Credentials
+
+You can get your Twilio credentials by signing in to [Twilio Console](https://console.twilio.com/).
+Once you get the Twilio Account SID, Auth Token, and Phone Number, modify the `.env` file with your credentials.
+
+### Capture the Testcases
+
+This command will start the recording of API calls:-
+
+```shell
+keploy record -c "uvicorn main:app"
+```
+
+Make API Calls using Hoppscotch, Postman or cURL command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
+
+### Make the POST requests
+
+1. Replace the place holder below i.e. `YOUR_REGISTERED_PERSONAL_PHONE_NUMBER` with your registered personal phone number that you linked with Twilio.
+
+```bash
+curl --location 'http://127.0.0.1:8000/send-sms/' \
+ --header 'Content-Type: application/json' \
+ --data-raw '{
+ "Body": "Test",
+ "To": ""
+ }'
+```
+
+2. Replace the place holder below i.e. `SOME_WRONG_PHONE_NUMBER` with any wrong phone number and make the request.
+
+```bash
+curl --location 'http://127.0.0.1:8000/send-sms/' \
+ --header 'Content-Type: application/json' \
+ --data-raw '{
+ "Body": "Test, testtt, testttttttssss :)",
+ "To": "",
+ }'
+```
+
+Now all these API calls were captured as **editable** testcases and written to `keploy/tests` folder. The keploy directory would also have `mocks` file that contains all the outputs of Twilio operations.
+
+## Run the Testcases
+
+Now let's run the application in test mode.
+
+```shell
+keploy test -c "python3 -m uvicorn main:app" --delay 10
+```
+
+So, no need to setup fake apis like Twilio or write mocks for them. Keploy automatically mocks them and, **The application thinks it's talking to Twilio 😄** . We can notice that for a single API without using Twilio, we got around 89% of coverage :
+
+
diff --git a/fastapi-twilio/img/testrun.png b/fastapi-twilio/img/testrun.png
new file mode 100644
index 0000000..8173f8e
Binary files /dev/null and b/fastapi-twilio/img/testrun.png differ
diff --git a/fastapi-twilio/keploy.yml b/fastapi-twilio/keploy.yml
new file mode 100755
index 0000000..34deba8
--- /dev/null
+++ b/fastapi-twilio/keploy.yml
@@ -0,0 +1,43 @@
+path: ""
+appId: 0
+appName: ""
+command: uvicorn main:app
+port: 0
+dnsPort: 26789
+proxyPort: 16789
+debug: false
+disableTele: false
+disableANSI: false
+containerName: ""
+networkName: ""
+buildDelay: 30
+test:
+ selectedTests: {}
+ globalNoise:
+ global: {}
+ test-sets: {}
+ delay: 5
+ apiTimeout: 5
+ skipCoverage: false
+ coverageReportPath: ""
+ ignoreOrdering: true
+ mongoPassword: default@123
+ language: ""
+ removeUnusedMocks: false
+ fallBackOnMiss: false
+ jacocoAgentPath: ""
+ basePath: ""
+ mocking: true
+ ignoredTests: {}
+record:
+ filters: []
+ recordTimer: 0s
+configPath: ""
+bypassRules: []
+generateGithubActions: true
+keployContainer: keploy-v2
+keployNetwork: keploy-network
+cmdType: native
+inCi: false
+
+# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
diff --git a/fastapi-twilio/main.py b/fastapi-twilio/main.py
new file mode 100644
index 0000000..3b410f7
--- /dev/null
+++ b/fastapi-twilio/main.py
@@ -0,0 +1,89 @@
+from fastapi import FastAPI, Request
+from fastapi.responses import Response
+from urllib.parse import quote
+import requests
+from pydantic import BaseModel
+import os
+from dotenv import load_dotenv
+
+# Load environment variables from a .env file
+load_dotenv()
+app = FastAPI()
+
+class Message(BaseModel):
+ Body: str
+ To: str
+
+@app.post('/send-sms/')
+def send_sms(data: Message):
+ twilio_account_sid = os.getenv('TWILIO_ACCOUNT_SID')
+ twilio_auth_token = os.getenv('TWILIO_AUTH_TOKEN')
+ twilio_phone_number = os.getenv('TWILIO_NUMBER')
+ url = f'https://api.twilio.com/2010-04-01/Accounts/{twilio_account_sid}/Messages.json'
+ payload = {
+ 'Body': data.Body,
+ 'From': twilio_phone_number,
+ 'To': data.To
+ }
+ response = requests.post(url=url, data=payload, auth=(twilio_account_sid, twilio_auth_token))
+ if response.status_code == 201:
+ return {"message": "SMS sent successfully!"}
+ return {"message": "Failed to send SMS.", "details": response.text}
+
+@app.post("/make-call/")
+def make_call(data: Message):
+ # Getting Twilio credentials and Twilio number from environment variables
+ account_sid = os.getenv('TWILIO_ACCOUNT_SID')
+ auth_token = os.getenv('TWILIO_AUTH_TOKEN')
+ twilio_number = os.getenv('TWILIO_NUMBER')
+
+ # Get public ngrok URL from environment variables
+ ngrok_url = os.getenv('NGROK_URL')
+
+ # Creating a voice URL with the message as a query param (Twilio will fetch this)
+ voice_url = f"{ngrok_url}/voice?message={quote(data.Body)}"
+
+ # Twilio's API endpoint to initiate a voice call
+ url = f"https://api.twilio.com/2010-04-01/Accounts/{account_sid}/Calls.json"
+
+ # Setting up the details of the call: whom to call, from which number, and what to say
+ payload = {
+ 'To': data.To,
+ 'From': twilio_number,
+ 'Url': voice_url
+ }
+
+ # Make a POST request to Twilio to start the call
+ response = requests.post(url, data=payload, auth=(account_sid, auth_token))
+
+ # Check if the call was successfully created
+ if response.status_code == 201:
+ return {"message": "Call initiated successfully!"}
+ return {"message": "Failed to make the call.", "details": response.text}
+
+
+@app.api_route("/voice", methods=["GET", "POST"])
+async def voice(request: Request):
+ # Extracting the 'message' query parameter from the URL, or use a default
+ message = request.query_params.get("message", "Hello from Twilio!")
+
+
+ print(f"📞 Twilio is trying to say: {message}")
+
+ # Respond with TwiML (Twilio Markup Language) to tell Twilio what to speak
+ response = f"""
+
+ {message}
+ """
+
+
+ return Response(content=response, media_type="application/xml")
+
+
+# Graceful shutdown
+@app.on_event("shutdown")
+async def shutdown_event():
+ print("Shutting down gracefully...")
+
+ # Perform any additional cleanup here if needed
+ # For example, closing database connections or other resources
diff --git a/fastapi-twilio/requirements.txt b/fastapi-twilio/requirements.txt
new file mode 100644
index 0000000..7a9ca73
--- /dev/null
+++ b/fastapi-twilio/requirements.txt
@@ -0,0 +1,53 @@
+aiohttp==3.8.6
+aiohttp-retry==2.8.3
+aiosignal==1.3.1
+annotated-types==0.6.0
+anyio==3.7.1
+async-timeout==4.0.3
+attrs==23.1.0
+certifi==2023.7.22
+charset-normalizer==3.3.2
+click==8.1.7
+exceptiongroup==1.1.3
+fastapi==0.104.1
+frozenlist==1.4.0
+h11==0.14.0
+idna==3.4
+multidict==6.0.4
+pydantic==2.4.2
+pydantic_core==2.10.1
+PyJWT==2.8.0
+python-dotenv==1.0.0
+requests==2.31.0
+sniffio==1.3.0
+starlette==0.27.0
+twilio==8.10.1
+typing_extensions==4.8.0
+urllib3==2.0.7
+uvicorn==0.24.0.post1
+yarl==1.9.2
+blinker==1.5
+chardet==5.1.0
+configobj==5.0.8
+cryptography==38.0.4
+httplib2==0.20.4
+Jinja2==3.1.2
+jsonpatch==1.32
+jsonpointer==2.3
+jsonschema==4.10.3
+markdown-it-py==2.1.0
+MarkupSafe==2.1.2
+mdurl==0.1.2
+netifaces==0.11.0
+oauthlib==3.2.2
+Pygments==2.14.0
+pyparsing==3.0.9
+pyrsistent==0.18.1
+pyserial==3.5
+PySimpleSOAP==1.16.2
+python-debian==0.1.49
+python-debianbts==4.0.1
+PyYAML==6.0
+rich==13.3.1
+six==1.16.0
+ssh-import-id==5.10
diff --git a/flask-mongo/Dockerfile b/flask-mongo/Dockerfile
index cbefd2c..f892efb 100644
--- a/flask-mongo/Dockerfile
+++ b/flask-mongo/Dockerfile
@@ -14,4 +14,4 @@ RUN pip3 install -r requirements.txt
EXPOSE 6000
# Start the Flask application
-CMD ["python3", "app.py"]
+CMD ["python3", "app.py"]
\ No newline at end of file
diff --git a/flask-mongo/README.md b/flask-mongo/README.md
index 8080c5f..5239c2b 100644
--- a/flask-mongo/README.md
+++ b/flask-mongo/README.md
@@ -1,30 +1,399 @@
+# Flask-Mongo Sample Application
+
This application is a simple student management API built using Python's Flask framework and MongoDB for data storage. It allows you to perform basic CRUD (Create, Read, Update, Delete) operations on student records. The API supports CORS (Cross-Origin Resource Sharing) to facilitate cross-domain requests.
-Usage:
+# Introduction
-1. Get List of Students: Retrieve a list of all students.
-```
-curl http://localhost:6000/students
-```
+🪄 Dive into the world of Student CRUD Apps and see how seamlessly Keploy integrated with [Flask](https://flask.palletsprojects.com/en/3.0.x/) and [MongoDB](https://www.mongodb.com/). Buckle up, it's gonna be a fun ride! 🎢
-2. Get Student by ID: Retrieve details of a specific student using their student ID.
-```
-curl http://localhost:6000/students/12345
-```
+## Pre-Requisite 🛠️
-3. Create a New Student: Add a new student record to the database.
+- Install WSL (`wsl --install`) for Windows.
+#### Optional 🛠️
+
+- Install Colima( `brew install colima && colima start` ) for MacOs.
+
+## Install Keploy
+
+- Install Keploy CLI using the following command:
+
+```bash
+curl -O -L https://keploy.io/install.sh && source install.sh
```
-curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12345", "name": "John Doe", "age": 20}' http://localhost:6000/students
-```
-4. Update Student Information: Update details of an existing student using their student ID.
+## Get Started! 🎬
+
+## Setup the MongoDB Database 📦
+
+Create a docker network, run -
+
+```bash
+docker network create backend
```
-curl -X PUT -H "Content-Type: application/json" -d '{"name": "Jane Smith", "age": 21}' http://localhost:6000/students/12345
+
+Start the MongoDB instance-
+
+```bash
+docker run -p 27017:27017 -d --network backend --name mongo mongo
```
-5. Delete Student: Delete a student record by their student ID.
+## Clone a simple Student Management API 🧪
+
+```bash
+git clone https://github.com/keploy/samples-python.git && cd samples-python/flask-mongo
+pip3 install -r requirements.txt
```
-curl -X DELETE http://localhost:6000/students/12345
-```
\ No newline at end of file
+
+## Installation 📥
+
+ ### With Docker 🎥
+
+ Build the app image:
+
+ ```sh
+ docker build -t flask-app:1.0 .
+ ```
+
+ Capture the test-cases-
+
+ ```shell
+ keploy record -c "docker run -p 6000:6000 --name flask-app --network backend flask-app:1.0"
+ ```
+
+ 🔥**Make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+ Let's make URLs short and sweet:
+
+ ### Generate testcases
+
+ To generate testcases we just need to **make some API calls.**
+
+ **1. Make a POST request**
+
+ ```bash
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12345", "name": "John Doe", "age": 20}' http://localhost:6000/students
+ ```
+
+ Let's add one more student:
+
+ ```sh
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12346", "name": "Alice Green", "age": 22}' http://localhost:6000/students
+ ```
+
+ **2. Make a GET request**
+
+ ```bash
+ curl http://localhost:6000/students
+ ```
+
+ **3. Make a PUT request**
+
+ ```bash
+ curl -X PUT -H "Content-Type: application/json" -d '{"name": "Jane Smith", "age": 21}' http://localhost:6000/students/12345
+ ```
+
+ **4. Make a GET request**
+
+ ```bash
+ curl http://localhost:6000/students/12345
+ ```
+
+ **5. Make a DELETE request**
+
+ ```bash
+ curl -X DELETE http://localhost:6000/students/12345
+ ```
+
+ Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+ ```yaml
+ version: api.keploy.io/v1beta2
+ kind: Http
+ name: test-1
+ spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:6000/students
+ header:
+ Accept: "*/*"
+ Content-Length: "56"
+ Content-Type: application/json
+ Host: localhost:6000
+ User-Agent: curl/7.81.0
+ body: '{"student_id": "12344", "name": "John Doeww", "age": 10}'
+ body_type: ""
+ timestamp: 2023-11-13T13:02:32.241333562Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "48"
+ Content-Type: application/json
+ Date: Mon, 13 Nov 2023 13:02:32 GMT
+ Server: Werkzeug/2.2.2 Python/3.9.18
+ body: |
+ {
+ "message": "Student created successfully"
+ }
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2023-11-13T13:02:34.752123715Z
+ objects: []
+ assertions:
+ noise:
+ - header.Date
+ created: 1699880554
+ curl: |-
+ curl --request POST \
+ --url http://localhost:6000/students \
+ --header 'Host: localhost:6000' \
+ --header 'User-Agent: curl/7.81.0' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data '{"student_id": "12344", "name": "John Doeww", "age": 10}'
+ ```
+
+ This is how `mocks.yml` generated would look like:-
+
+ ```yaml
+ version: api.keploy.io/v1beta2
+ kind: Mongo
+ name: mocks
+ spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"students","filter":{"student_id":"12345"},"projection":{"_id":{"$numberInt":"0"}},"limit":{"$numberInt":"1"},"singleBatch":true,"lsid":{"id":{"$binary":{"base64":"vPKsEFRdTLytlbnyVimqIA==","subType":"04"}}},"$db":"studentsdb"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 187
+ requestId: 2127584089
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"students","filter":{"student_id":"12345"},"projection":{"_id":{"$numberInt":"0"}},"limit":{"$numberInt":"1"},"singleBatch":true,"lsid":{"id":{"$binary":{"base64":"vPKsEFRdTLytlbnyVimqIA==","subType":"04"}}},"$db":"studentsdb"} }'
+ checksum: 0
+ read_delay: 3469848802
+ responses:
+ - header:
+ length: 166
+ requestId: 154
+ responseTo: 2127584089
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"student_id":"12345","name":"John Doe","age":{"$numberInt":"20"}}],"id":{"$numberLong":"0"},"ns":"studentsdb.students"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 869555
+ created: 1699880576
+ reqTimestampMock: 2023-11-13T13:02:56.385067848Z
+ resTimestampMock: 2023-11-13T13:02:56.386374941Z
+ ```
+
+ Want to see if everything works as expected?
+
+ #### Run Tests
+
+ Time to put things to the test 🧪
+
+ ```shell
+ keploy test -c "sudo docker run -p 6000:6000 --rm --network backend --name flask-app flask-app:1.0" --delay 10
+ ```
+
+ > The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+ Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+ ## Wrapping it up 🎉
+
+ Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+ Happy coding! ✨👩💻👨💻✨
+
+---
+
+ ## Running In Linux/WSL
+ We'll be running our sample application right on Linux, but just to make things a tad more thrilling, we'll have the database (PostgreSQL) chill on Docker. Ready? Let's get the party started!🎉
+
+ ### 📼 Roll the Tape - Recording Time!
+
+ Install the dependencies:
+
+ ```bash
+ pip install -r requirements.txt
+ ```
+
+ Now, let's Capture the test-cases-
+
+ In `app.py`, replace the MongoDB connection URL with - `mongodb://0.0.0.0:27017/`
+
+ Ready, set, record! Here's how:
+
+ ```bash
+ keploy record -c "python3 app.py"
+ ```
+
+ Keep an eye out for the `-c `flag! It's the command charm to run the app.
+
+ Alright, magician! With the app alive and kicking, let's weave some test cases. The spell? Making some API calls! Postman, Hoppscotch, or the classic curl - pick your wand.
+
+ ### Generate testcases
+
+ To generate testcases we just need to **make some API calls.**
+
+ **1. Make a POST request**
+
+ ```bash
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12345", "name": "John Doe", "age": 20}' http://localhost:6000/students
+ ```
+
+ Let's add one more student:
+
+ ```sh
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12346", "name": "Alice Green", "age": 22}' http://localhost:6000/students
+ ```
+
+ **2. Make a GET request**
+
+ ```bash
+ curl http://localhost:6000/students
+ ```
+
+ **3. Make a PUT request**
+
+ ```bash
+ curl -X PUT -H "Content-Type: application/json" -d '{"name": "Jane Smith", "age": 21}' http://localhost:6000/students/12345
+ ```
+
+ **4. Make a GET request**
+
+ ```bash
+ curl http://localhost:6000/students/12345
+ ```
+
+ **5. Make a DELETE request**
+
+ ```bash
+ curl -X DELETE http://localhost:6000/students/12345
+ ```
+
+ Give yourself a pat on the back! With that simple spell, you've conjured up a test case with a mock! Explore the **Keploy directory** and you'll discover your handiwork in `test-1.yml` and `mocks.yml`.
+
+ ```yaml
+ version: api.keploy.io/v1beta2
+ kind: Http
+ name: test-1
+ spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:6000/students
+ header:
+ Accept: "*/*"
+ Content-Length: "56"
+ Content-Type: application/json
+ Host: localhost:6000
+ User-Agent: curl/7.81.0
+ body: '{"student_id": "12344", "name": "John Doeww", "age": 10}'
+ body_type: ""
+ timestamp: 2023-11-13T13:02:32.241333562Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "48"
+ Content-Type: application/json
+ Date: Mon, 13 Nov 2023 13:02:32 GMT
+ Server: Werkzeug/2.2.2 Python/3.9.18
+ body: |
+ {
+ "message": "Student created successfully"
+ }
+ body_type: ""
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2023-11-13T13:02:34.752123715Z
+ objects: []
+ assertions:
+ noise:
+ - header.Date
+ created: 1699880554
+ curl: |-
+ curl --request POST \
+ --url http://localhost:6000/students \
+ --header 'Host: localhost:6000' \
+ --header 'User-Agent: curl/7.81.0' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data '{"student_id": "12344", "name": "John Doeww", "age": 10}'
+ ```
+
+ This is how `mocks.yml` generated would look like:-
+
+ ```yaml
+ version: api.keploy.io/v1beta2
+ kind: Mongo
+ name: mocks
+ spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"students","filter":{"student_id":"12345"},"projection":{"_id":{"$numberInt":"0"}},"limit":{"$numberInt":"1"},"singleBatch":true,"lsid":{"id":{"$binary":{"base64":"vPKsEFRdTLytlbnyVimqIA==","subType":"04"}}},"$db":"studentsdb"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 187
+ requestId: 2127584089
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"students","filter":{"student_id":"12345"},"projection":{"_id":{"$numberInt":"0"}},"limit":{"$numberInt":"1"},"singleBatch":true,"lsid":{"id":{"$binary":{"base64":"vPKsEFRdTLytlbnyVimqIA==","subType":"04"}}},"$db":"studentsdb"} }'
+ checksum: 0
+ read_delay: 3469848802
+ responses:
+ - header:
+ length: 166
+ requestId: 154
+ responseTo: 2127584089
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"student_id":"12345","name":"John Doe","age":{"$numberInt":"20"}}],"id":{"$numberLong":"0"},"ns":"studentsdb.students"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 869555
+ created: 1699880576
+ reqTimestampMock: 2023-11-13T13:02:56.385067848Z
+ resTimestampMock: 2023-11-13T13:02:56.386374941Z
+ ```
+
+ On terminal we can see the testcases generated -
+
+ 
+
+ #### Run Tests
+
+ Time to put things to the test 🧪
+
+ ```shell
+ keploy test -c "python3 app.py" --delay 10
+ ```
+ 
+
+ > The `--delay` flag? Oh, that's just giving your app a little breather (in seconds) before the test cases come knocking.
+
+ Final thoughts? Dive deeper! Try different API calls, tweak the DB response in the `mocks.yml`, or fiddle with the request or response in `test-x.yml`. Run the tests again and see the magic unfold!✨👩💻👨💻✨
+
+ ## Wrapping it up 🎉
+
+ Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible. 😊🚀
+
+ Happy coding! ✨👩💻👨💻✨
\ No newline at end of file
diff --git a/flask-mongo/app.py b/flask-mongo/app.py
index 3533f16..8a6418b 100644
--- a/flask-mongo/app.py
+++ b/flask-mongo/app.py
@@ -1,6 +1,8 @@
from flask import Flask, request, jsonify
from pymongo import MongoClient
from flask_cors import CORS
+import collections.abc
+
app = Flask(__name__)
cors = CORS(app, resources={r"/api/*": {"origins": "*"}})
diff --git a/flask-mongo/call.sh b/flask-mongo/call.sh
new file mode 100644
index 0000000..ca13ded
--- /dev/null
+++ b/flask-mongo/call.sh
@@ -0,0 +1,13 @@
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12345", "name": "John Doe", "age": 20}' http://localhost:6000/students
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12346", "name": "Alice Green", "age": 22}' http://localhost:6000/students
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12345", "name": "John Doe", "age": 20}' http://localhost:6000/students
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12346", "name": "Alice Green", "age": 22}' http://localhost:6000/students
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12345", "name": "John Doe", "age": 20}' http://localhost:6000/students
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12346", "name": "Alice Green", "age": 22}' http://localhost:6000/students
+
+ curl -X POST -H "Content-Type: application/json" -d '{"student_id": "12347", "name": "Bob Brown", "age": 24}' http://localhost:6000/students
+
+ curl http://localhost:6000/students
+ curl http://localhost:6000/students/12345
+ curl -X PUT -H "Content-Type: application/json" -d '{"name": "Jane Smith", "age": 21}' http://localhost:6000/students/12345
+ curl -X DELETE http://localhost:6000/students/12345
\ No newline at end of file
diff --git a/flask-mongo/docker-compose.yml b/flask-mongo/docker-compose.yml
index 1991b57..5e8b47b 100644
--- a/flask-mongo/docker-compose.yml
+++ b/flask-mongo/docker-compose.yml
@@ -8,9 +8,10 @@ services:
volumes:
- data:/data/db
networks:
- - backend
+ - keploy-network
flask-app:
+ image: flask-app:1.0
container_name: flask-app
build:
context: .
@@ -19,10 +20,10 @@ services:
depends_on:
- mongo
networks:
- - backend
+ - keploy-network
networks:
- backend:
+ keploy-network:
external: true
volumes:
- data:
+ data:
\ No newline at end of file
diff --git a/flask-mongo/img/testcases.png b/flask-mongo/img/testcases.png
new file mode 100644
index 0000000..2199621
Binary files /dev/null and b/flask-mongo/img/testcases.png differ
diff --git a/flask-mongo/img/testrun-with-coverage.png b/flask-mongo/img/testrun-with-coverage.png
new file mode 100644
index 0000000..2f3ee30
Binary files /dev/null and b/flask-mongo/img/testrun-with-coverage.png differ
diff --git a/flask-mongo/keploy.yml b/flask-mongo/keploy.yml
new file mode 100755
index 0000000..e71edbf
--- /dev/null
+++ b/flask-mongo/keploy.yml
@@ -0,0 +1,43 @@
+path: ""
+appId: 0
+appName: ""
+command: python3 app.py
+port: 0
+dnsPort: 26789
+proxyPort: 16789
+debug: false
+disableTele: false
+disableANSI: false
+containerName: ""
+networkName: ""
+buildDelay: 30
+test:
+ selectedTests: {}
+ globalNoise:
+ global: {}
+ test-sets: {}
+ delay: 5
+ apiTimeout: 5
+ skipCoverage: false
+ coverageReportPath: ""
+ ignoreOrdering: true
+ mongoPassword: default@123
+ language: ""
+ removeUnusedMocks: false
+ fallBackOnMiss: false
+ jacocoAgentPath: ""
+ basePath: ""
+ mocking: true
+ ignoredTests: {}
+record:
+ filters: []
+ recordTimer: 0s
+configPath: ""
+bypassRules: []
+generateGithubActions: true
+keployContainer: keploy-v2
+keployNetwork: keploy-network
+cmdType: native
+inCi: false
+
+# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
diff --git a/flask-mongo/keploy/test-set-1/config.yaml b/flask-mongo/keploy/test-set-1/config.yaml
deleted file mode 100755
index e451518..0000000
--- a/flask-mongo/keploy/test-set-1/config.yaml
+++ /dev/null
@@ -1,167 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Mongo
-name: config
-spec:
- metadata:
- operation: '{ OpQuery flags: [], fullCollectionName: admin.$cmd, numberToSkip: 0, numberToReturn: -1, query: {"ismaster": {"$numberInt":"1"},"helloOk": true,"client": {"driver": {"name": "PyMongo","version": "4.4.1"},"os": {"type": "Linux","name": "Linux","architecture": "aarch64","version": "6.1.29-0-virt"},"platform": "CPython 3.9.17.final.0"}}, returnFieldsSelector: }'
- requests:
- - header:
- length: 262
- requestId: 1890541915
- responseTo: 0
- Opcode: 2004
- message:
- flags: 0
- collection_name: admin.$cmd
- number_to_skip: 0
- number_to_return: -1
- query: '{"ismaster":{"$numberInt":"1"},"helloOk":true,"client":{"driver":{"name":"PyMongo","version":"4.4.1"},"os":{"type":"Linux","name":"Linux","architecture":"aarch64","version":"6.1.29-0-virt"},"platform":"CPython 3.9.17.final.0"}}'
- return_fields_selector: ""
- read_delay: 82208
- responses:
- - header:
- length: 329
- requestId: 3
- responseTo: 1890541915
- Opcode: 1
- message:
- response_flags: 8
- cursor_id: 0
- starting_from: 0
- number_returned: 1
- documents:
- - '{"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"64dcc6eb86233da4f389a58b"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1692190448932"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"1"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"17"},"readOnly":false,"ok":{"$numberDouble":"1.0"}}'
- read_delay: 659750
- created: 1692190448
----
-version: api.keploy.io/v1beta2
-kind: Mongo
-name: config
-spec:
- metadata:
- operation: '{ OpQuery flags: [], fullCollectionName: admin.$cmd, numberToSkip: 0, numberToReturn: -1, query: {"ismaster": {"$numberInt":"1"},"helloOk": true,"client": {"driver": {"name": "PyMongo","version": "4.4.1"},"os": {"type": "Linux","name": "Linux","architecture": "aarch64","version": "6.1.29-0-virt"},"platform": "CPython 3.9.17.final.0"},"compression": []}, returnFieldsSelector: }'
- requests:
- - header:
- length: 280
- requestId: 1076681270
- responseTo: 0
- Opcode: 2004
- message:
- flags: 0
- collection_name: admin.$cmd
- number_to_skip: 0
- number_to_return: -1
- query: '{"ismaster":{"$numberInt":"1"},"helloOk":true,"client":{"driver":{"name":"PyMongo","version":"4.4.1"},"os":{"type":"Linux","name":"Linux","architecture":"aarch64","version":"6.1.29-0-virt"},"platform":"CPython 3.9.17.final.0"},"compression":[]}'
- return_fields_selector: ""
- read_delay: 51917
- responses:
- - header:
- length: 329
- requestId: 4
- responseTo: 1076681270
- Opcode: 1
- message:
- response_flags: 8
- cursor_id: 0
- starting_from: 0
- number_returned: 1
- documents:
- - '{"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"64dcc6eb86233da4f389a58b"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1692190448936"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"2"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"17"},"readOnly":false,"ok":{"$numberDouble":"1.0"}}'
- read_delay: 999250
- created: 1692190448
----
-version: api.keploy.io/v1beta2
-kind: Mongo
-name: config
-spec:
- metadata:
- operation: '{ OpMsg flags: 65536, sections: [{ SectionSingle msg: {"hello":{"$numberInt":"1"},"topologyVersion":{"processId":{"$oid":"64dcc6eb86233da4f389a58b"},"counter":{"$numberLong":"0"}},"maxAwaitTimeMS":{"$numberInt":"10000"},"$db":"admin"} }], checksum: 0 }'
- requests:
- - header:
- length: 134
- requestId: 613273587
- responseTo: 0
- Opcode: 2013
- message:
- flagBits: 65536
- sections:
- - '{ SectionSingle msg: {"hello":{"$numberInt":"1"},"topologyVersion":{"processId":{"$oid":"64dcc6eb86233da4f389a58b"},"counter":{"$numberLong":"0"}},"maxAwaitTimeMS":{"$numberInt":"10000"},"$db":"admin"} }'
- checksum: 0
- read_delay: 3336333
- responses:
- - header:
- length: 313
- requestId: 10
- responseTo: 613273587
- Opcode: 2013
- message:
- flagBits: 2
- sections:
- - '{ SectionSingle msg: {"isWritablePrimary":true,"topologyVersion":{"processId":{"$oid":"64dcc6eb86233da4f389a58b"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1692190458940"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"1"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"17"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
- checksum: 0
- read_delay: 10005077213
- created: 1692190458
----
-version: api.keploy.io/v1beta2
-kind: Mongo
-name: config
-spec:
- metadata:
- operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"hello":{"$numberInt":"1"},"$db":"admin"} }], checksum: 0 }'
- requests:
- - header:
- length: 52
- requestId: 1075693109
- responseTo: 0
- Opcode: 2013
- message:
- flagBits: 0
- sections:
- - '{ SectionSingle msg: {"hello":{"$numberInt":"1"},"$db":"admin"} }'
- checksum: 0
- read_delay: 10043184088
- responses:
- - header:
- length: 313
- requestId: 11
- responseTo: 1075693109
- Opcode: 2013
- message:
- flagBits: 0
- sections:
- - '{ SectionSingle msg: {"isWritablePrimary":true,"topologyVersion":{"processId":{"$oid":"64dcc6eb86233da4f389a58b"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1692190458982"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"3"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"17"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
- checksum: 0
- read_delay: 746417
- created: 1692190458
----
-version: api.keploy.io/v1beta2
-kind: Mongo
-name: config
-spec:
- metadata:
- operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"ismaster":{"$numberInt":"1"},"helloOk":true,"$db":"admin"} }], checksum: 0 }'
- requests:
- - header:
- length: 65
- requestId: 1299455543
- responseTo: 0
- Opcode: 2013
- message:
- flagBits: 0
- sections:
- - '{ SectionSingle msg: {"ismaster":{"$numberInt":"1"},"helloOk":true,"$db":"admin"} }'
- checksum: 0
- read_delay: 10042282047
- responses:
- - header:
- length: 314
- requestId: 15
- responseTo: 1299455543
- Opcode: 2013
- message:
- flagBits: 0
- sections:
- - '{ SectionSingle msg: {"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"64dcc6eb86233da4f389a58b"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1692190469027"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"3"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"17"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
- checksum: 0
- read_delay: 1815417
- created: 1692190469
diff --git a/flask-mongo/keploy/test-set-1/mocks.yaml b/flask-mongo/keploy/test-set-1/mocks.yaml
deleted file mode 100755
index 3051236..0000000
--- a/flask-mongo/keploy/test-set-1/mocks.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Mongo
-name: mocks
-spec:
- metadata:
- operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"insert":"students","ordered":true,"lsid":{"id":{"$binary":{"base64":"HHvg4XLYQFWra6WjBn1j/A==","subType":"04"}}},"$db":"studentsdb"} }, { SectionSingle identifier: documents , msgs: [ {"_id":{"$oid":"64dcc6f03b29d5de7bb2ae07"},"student_id":"123","name":"Sarthak","age":{"$numberInt":"20"}} ] }], checksum: 0 }'
- requests:
- - header:
- length: 197
- requestId: 1340074696
- responseTo: 0
- Opcode: 2013
- message:
- flagBits: 0
- sections:
- - '{ SectionSingle msg: {"insert":"students","ordered":true,"lsid":{"id":{"$binary":{"base64":"HHvg4XLYQFWra6WjBn1j/A==","subType":"04"}}},"$db":"studentsdb"} }'
- - '{ SectionSingle identifier: documents , msgs: [ {"_id":{"$oid":"64dcc6f03b29d5de7bb2ae07"},"student_id":"123","name":"Sarthak","age":{"$numberInt":"20"}} ] }'
- checksum: 0
- read_delay: 566167
- responses:
- - header:
- length: 45
- requestId: 6
- responseTo: 1340074696
- Opcode: 2013
- message:
- flagBits: 0
- sections:
- - '{ SectionSingle msg: {"n":{"$numberInt":"1"},"ok":{"$numberDouble":"1.0"}} }'
- checksum: 0
- read_delay: 27458
- created: 1692190448
----
-version: api.keploy.io/v1beta2
-kind: Mongo
-name: mocks
-spec:
- metadata:
- operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"students","filter":{},"projection":{"_id":{"$numberInt":"0"}},"lsid":{"id":{"$binary":{"base64":"HHvg4XLYQFWra6WjBn1j/A==","subType":"04"}}},"$db":"studentsdb"} }], checksum: 0 }'
- requests:
- - header:
- length: 140
- requestId: 1596327406
- responseTo: 0
- Opcode: 2013
- message:
- flagBits: 0
- sections:
- - '{ SectionSingle msg: {"find":"students","filter":{},"projection":{"_id":{"$numberInt":"0"}},"lsid":{"id":{"$binary":{"base64":"HHvg4XLYQFWra6WjBn1j/A==","subType":"04"}}},"$db":"studentsdb"} }'
- checksum: 0
- read_delay: 9681533921
- responses:
- - header:
- length: 273
- requestId: 9
- responseTo: 1596327406
- Opcode: 2013
- message:
- flagBits: 0
- sections:
- - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"student_id":"123","name":"Sarthak","age":{"$numberInt":"20"}},{"student_id":"123","name":"Sarthak","age":{"$numberInt":"20"}},{"student_id":"123","name":"Sarthak","age":{"$numberInt":"20"}}],"id":{"$numberLong":"0"},"ns":"studentsdb.students"},"ok":{"$numberDouble":"1.0"}} }'
- checksum: 0
- read_delay: 40167
- created: 1692190458
diff --git a/flask-mongo/keploy/test-set-1/test-1.yaml b/flask-mongo/keploy/test-set-1/test-1.yaml
deleted file mode 100755
index 4141f28..0000000
--- a/flask-mongo/keploy/test-set-1/test-1.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-1
-spec:
- metadata: {}
- req:
- method: POST
- proto_major: 1
- proto_minor: 1
- url: http://localhost:6000/students
- header:
- Accept: '*/*'
- Content-Length: "51"
- Content-Type: application/json
- Host: localhost:6000
- User-Agent: curl/7.77.0
- body: '{"student_id": "123", "name": "Sarthak", "age": 20}'
- body_type: ""
- resp:
- status_code: 200
- header:
- Content-Length: "48"
- Content-Type: application/json
- Date: Wed, 16 Aug 2023 12:54:08 GMT
- Server: Werkzeug/2.3.7 Python/3.9.17
- body: |
- {
- "message": "Student created successfully"
- }
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- objects: []
- assertions:
- noise:
- - header.Date
- created: 1692190448
diff --git a/flask-mongo/keploy/test-set-1/test-2.yaml b/flask-mongo/keploy/test-set-1/test-2.yaml
deleted file mode 100755
index 77cb4a3..0000000
--- a/flask-mongo/keploy/test-set-1/test-2.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-version: api.keploy.io/v1beta2
-kind: Http
-name: test-2
-spec:
- metadata: {}
- req:
- method: GET
- proto_major: 1
- proto_minor: 1
- url: http://localhost:6000/students
- header:
- Accept: '*/*'
- Host: localhost:6000
- User-Agent: curl/7.77.0
- body: ""
- body_type: ""
- resp:
- status_code: 200
- header:
- Content-Length: "224"
- Content-Type: application/json
- Date: Wed, 16 Aug 2023 12:54:18 GMT
- Server: Werkzeug/2.3.7 Python/3.9.17
- body: "[\n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }, \n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }, \n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }\n]\n"
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- objects: []
- assertions:
- noise:
- - header.Date
- - body.name
- created: 1692190458
diff --git a/flask-mongo/keploy/testReports/report-1.yaml b/flask-mongo/keploy/testReports/report-1.yaml
deleted file mode 100755
index 14623ce..0000000
--- a/flask-mongo/keploy/testReports/report-1.yaml
+++ /dev/null
@@ -1,181 +0,0 @@
-version: api.keploy.io/v1beta1
-name: report-1
-status: PASSED
-success: 2
-failure: 0
-total: 2
-tests:
- - kind: Http
- name: report-1
- status: PASSED
- started: 1692258836
- completed: 1692258836
- test_case_path: /files/keploy
- mock_path: ""
- test_case_id: test-1
- req:
- method: POST
- proto_major: 1
- proto_minor: 1
- url: http://172.19.0.4:6000/students
- header:
- Accept: '*/*'
- Content-Length: "51"
- Content-Type: application/json
- Host: localhost:6000
- User-Agent: curl/7.77.0
- body: '{"student_id": "123", "name": "Sarthak", "age": 20}'
- body_type: ""
- resp:
- status_code: 200
- header:
- Content-Length: "48"
- Content-Type: application/json
- Date: Wed, 16 Aug 2023 12:54:08 GMT
- Server: Werkzeug/2.3.7 Python/3.9.17
- body: |
- {
- "message": "Student created successfully"
- }
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- noise:
- - header.Date
- result:
- status_code:
- normal: true
- expected: 200
- actual: 200
- headers_result:
- - normal: true
- expected:
- key: Server
- value:
- - Werkzeug/2.3.7 Python/3.9.17
- actual:
- key: Server
- value:
- - Werkzeug/2.3.7 Python/3.9.17
- - normal: true
- expected:
- key: Content-Length
- value:
- - "48"
- actual:
- key: Content-Length
- value:
- - "48"
- - normal: true
- expected:
- key: Content-Type
- value:
- - application/json
- actual:
- key: Content-Type
- value:
- - application/json
- - normal: true
- expected:
- key: Date
- value:
- - Wed, 16 Aug 2023 12:54:08 GMT
- actual:
- key: Date
- value:
- - Thu, 17 Aug 2023 07:53:56 GMT
- body_result:
- - normal: true
- type: JSON
- expected: |
- {
- "message": "Student created successfully"
- }
- actual: |
- {
- "message": "Student created successfully"
- }
- dep_result: []
- - kind: Http
- name: report-1
- status: PASSED
- started: 1692258836
- completed: 1692258836
- test_case_path: /files/keploy
- mock_path: ""
- test_case_id: test-2
- req:
- method: GET
- proto_major: 1
- proto_minor: 1
- url: http://172.19.0.4:6000/students
- header:
- Accept: '*/*'
- Host: localhost:6000
- User-Agent: curl/7.77.0
- body: ""
- body_type: ""
- resp:
- status_code: 200
- header:
- Content-Length: "224"
- Content-Type: application/json
- Date: Wed, 16 Aug 2023 12:54:18 GMT
- Server: Werkzeug/2.3.7 Python/3.9.17
- body: "[\n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }, \n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }, \n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }\n]\n"
- body_type: ""
- status_message: ""
- proto_major: 0
- proto_minor: 0
- noise:
- - header.Date
- - body.name
- result:
- status_code:
- normal: true
- expected: 200
- actual: 200
- headers_result:
- - normal: true
- expected:
- key: Date
- value:
- - Wed, 16 Aug 2023 12:54:18 GMT
- actual:
- key: Date
- value:
- - Thu, 17 Aug 2023 07:53:56 GMT
- - normal: true
- expected:
- key: Server
- value:
- - Werkzeug/2.3.7 Python/3.9.17
- actual:
- key: Server
- value:
- - Werkzeug/2.3.7 Python/3.9.17
- - normal: true
- expected:
- key: Content-Length
- value:
- - "224"
- actual:
- key: Content-Length
- value:
- - "224"
- - normal: true
- expected:
- key: Content-Type
- value:
- - application/json
- actual:
- key: Content-Type
- value:
- - application/json
- body_result:
- - normal: true
- type: JSON
- expected: "[\n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }, \n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }, \n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }\n]\n"
- actual: "[\n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }, \n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }, \n {\n \"age\": 20, \n \"name\": \"Sarthak\", \n \"student_id\": \"123\"\n }\n]\n"
- dep_result: []
diff --git a/flask-mongo/postman_tests/delete.js b/flask-mongo/postman_tests/delete.js
new file mode 100644
index 0000000..a2e8f13
--- /dev/null
+++ b/flask-mongo/postman_tests/delete.js
@@ -0,0 +1,17 @@
+pm.test("Status code is 200 or 404", function () {
+ pm.expect(pm.response.code).to.be.oneOf([200, 404]);
+});
+
+pm.test("Successful deletion response message", function () {
+ if (pm.response.code === 200) {
+ var jsonData = pm.response.json();
+ pm.expect(jsonData.message).to.eql("Task deleted successfully");
+ }
+});
+
+pm.test("Task not found", function () {
+ if (pm.response.code === 404) {
+ var jsonData = pm.response.json();
+ pm.expect(jsonData.error).to.eql("Task not found");
+ }
+});
diff --git a/flask-mongo/postman_tests/get.js b/flask-mongo/postman_tests/get.js
new file mode 100644
index 0000000..74b758a
--- /dev/null
+++ b/flask-mongo/postman_tests/get.js
@@ -0,0 +1,17 @@
+pm.test("Status code is 200", function () {
+ pm.response.to.have.status(200);
+});
+
+pm.test("Response is an array", function () {
+ var jsonData = pm.response.json();
+ pm.expect(jsonData.tasks).to.be.an("array");
+});
+
+pm.test("Each task has an id, title, and description", function () {
+ var jsonData = pm.response.json();
+ jsonData.tasks.forEach(function (task) {
+ pm.expect(task).to.have.property("id");
+ pm.expect(task).to.have.property("title");
+ pm.expect(task).to.have.property("description");
+ });
+});
diff --git a/flask-mongo/postman_tests/post.js b/flask-mongo/postman_tests/post.js
new file mode 100644
index 0000000..9efeeb8
--- /dev/null
+++ b/flask-mongo/postman_tests/post.js
@@ -0,0 +1,14 @@
+pm.test("Status code is 201", function () {
+ pm.response.to.have.status(201);
+});
+
+pm.test("Response contains task ID", function () {
+ var jsonData = pm.response.json();
+ pm.expect(jsonData).to.have.property("id");
+ pm.expect(jsonData.id).to.not.be.empty;
+});
+
+pm.test("Response message is correct", function () {
+ var jsonData = pm.response.json();
+ pm.expect(jsonData.message).to.eql("Task created successfully");
+});
diff --git a/flask-mongo/postman_tests/put.js b/flask-mongo/postman_tests/put.js
new file mode 100644
index 0000000..d8af377
--- /dev/null
+++ b/flask-mongo/postman_tests/put.js
@@ -0,0 +1,17 @@
+pm.test("Status code is 200 or 404", function () {
+ pm.expect(pm.response.code).to.be.oneOf([200, 404]);
+});
+
+pm.test("Successful update response message", function () {
+ if (pm.response.code === 200) {
+ var jsonData = pm.response.json();
+ pm.expect(jsonData.message).to.eql("Task updated successfully");
+ }
+});
+
+pm.test("Task not found or no changes made", function () {
+ if (pm.response.code === 404) {
+ var jsonData = pm.response.json();
+ pm.expect(jsonData.error).to.eql("Task not found or no changes were made");
+ }
+});
diff --git a/flask-mongo/requirements.txt b/flask-mongo/requirements.txt
index d7045e9..cbc61f9 100644
--- a/flask-mongo/requirements.txt
+++ b/flask-mongo/requirements.txt
@@ -1,3 +1,42 @@
-Flask==2.0.1
+Flask
pymongo==4.4.1
-Flask-Cors==3.0.1
+Flask-Cors==3.0.10
+Werkzeug==2.2.2
+annotated-types==0.7.0
+anyio==4.4.0
+certifi==2024.7.4
+charset-normalizer==3.3.2
+click==8.1.7
+coverage==7.6.0
+dnspython==2.6.1
+email_validator==2.2.0
+fastapi==0.111.1
+fastapi-cli==0.0.4
+h11==0.14.0
+httpcore==1.0.5
+httptools==0.6.1
+httpx==0.27.0
+idna==3.7
+Jinja2==3.1.4
+keploy==2.0.0a39
+markdown-it-py==3.0.0
+MarkupSafe==2.1.5
+mdurl==0.1.2
+pydantic==2.8.2
+pydantic_core==2.20.1
+Pygments==2.18.0
+python-dotenv==1.0.1
+python-multipart==0.0.9
+PyYAML==6.0.1
+requests==2.32.3
+rich==13.7.1
+shellingham==1.5.4
+sniffio==1.3.1
+starlette==0.37.2
+typer==0.12.3
+typing_extensions==4.12.2
+urllib3==2.2.2
+uvicorn==0.30.3
+uvloop==0.19.0
+watchfiles==0.22.0
+websockets==12.0
diff --git a/flask-mongo/test_app.py b/flask-mongo/test_app.py
new file mode 100644
index 0000000..f07148a
--- /dev/null
+++ b/flask-mongo/test_app.py
@@ -0,0 +1,32 @@
+import pytest
+from flask import Flask, json
+from pymongo import MongoClient
+from app import app as flask_app # Assuming your Flask app is saved as app.py
+
+@pytest.fixture
+def client():
+ with flask_app.test_client() as client:
+ yield client
+
+
+def test_get_nonexistent_student(client):
+ student_id = '999'
+ response = client.get(f'/students/{student_id}')
+ assert response.status_code == 200
+ data = json.loads(response.data)
+ assert data is None
+
+
+def test_update_nonexistent_student(client):
+ student_id = '999'
+ updated_student = {
+ "name": "Nonexistent Student",
+ "age": 30,
+ "major": "Physics"
+ }
+ response = client.put(f'/students/{student_id}', json=updated_student)
+ assert response.status_code == 200
+ data = json.loads(response.data)
+ assert data["message"] == "Student updated successfully"
+
+
diff --git a/flask-mongo/test_keploy.py b/flask-mongo/test_keploy.py
new file mode 100644
index 0000000..4ee126a
--- /dev/null
+++ b/flask-mongo/test_keploy.py
@@ -0,0 +1,8 @@
+from keploy import run, RunOptions
+
+def test_keploy():
+ try:
+ options = RunOptions(delay=15, debug=False, port=0)
+ except ValueError as e:
+ print(e)
+ run("python3 -m coverage run -p --data-file=.coverage.keploy app.py", options)
\ No newline at end of file
diff --git a/flask-redis/Dockerfile b/flask-redis/Dockerfile
new file mode 100644
index 0000000..9c0e897
--- /dev/null
+++ b/flask-redis/Dockerfile
@@ -0,0 +1,26 @@
+# Use the official Python image from the Docker Hub
+FROM python:3.10-slim
+
+# RUN apt-get update && apt-get install -y curl
+# Set the working directory in the container
+WORKDIR /app
+
+# Copy the requirements file into the container
+COPY requirements.txt .
+
+# Install the Python dependencies
+RUN pip install --no-cache-dir -r requirements.txt
+
+# Copy the rest of the application code into the container
+COPY . .
+
+# Download Keploy CA certificate and setup script
+# RUN curl -o ca.crt https://raw.githubusercontent.com/keploy/keploy/main/pkg/core/proxy/asset/ca.crt && \
+# curl -o setup_ca.sh https://raw.githubusercontent.com/keploy/keploy/main/pkg/core/proxy/asset/setup_ca.sh && \
+# chmod +x setup_ca.sh # Make the setup script executable
+
+# Expose the port the app runs on
+EXPOSE 5000
+
+# Define the command to run the app
+CMD ["python", "app.py"]
diff --git a/flask-redis/README.md b/flask-redis/README.md
new file mode 100644
index 0000000..7364e9d
--- /dev/null
+++ b/flask-redis/README.md
@@ -0,0 +1,160 @@
+# flask-redis
+
+A sample App using flask and redis
+
+## Setup application
+
+1. Clone the repository and move to flask-redis folder
+2. Create a .env file and copy-paste below credentials:
+
+```bash
+REDIS_HOST=redis
+REDIS_PORT=6379
+```
+
+# Installing Redis
+
+```sh
+brew install redis
+```
+If homebrew is not installed, then go to https://brew.sh/ and install it.
+
+```bash
+git clone https://github.com/keploy/samples-typescript && cd samples-typescript/flask-redis
+
+# Install the dependencies
+pip3 install -r requirements.txt
+```
+
+# Installing Keploy
+
+Let's get started by setting up the Keploy alias with this command:
+
+```sh
+curl -O https://raw.githubusercontent.com/keploy/keploy/main/keploy.sh && source keploy.sh
+```
+
+## Using Keploy :
+
+There are 2 ways you can run this sample application.
+
+1. [Natively on Linux/WSL](#natively-on-ubuntuwsl)
+2. [Using Docker](#running-sample-app-using-docker)
+
+# Natively on Ubuntu/WSL
+
+## Let's install certificates
+
+1. **Install required packages:**
+
+ ```sh
+ sudo apt-get install -y --no-install-recommends ca-certificates curl
+ ```
+
+ This command installs necessary packages without additional recommended packages.
+
+2. **Download CA certificate:**
+
+ ```sh
+ curl -o ca.crt https://raw.githubusercontent.com/keploy/keploy/main/pkg/core/proxy/asset/ca.crt
+ ```
+
+ This command downloads the CA certificate to `ca.crt`.
+
+3. **Download setup script:**
+
+ ```sh
+ curl -o setup_ca.sh https://raw.githubusercontent.com/keploy/keploy/main/pkg/core/proxy/asset/setup_ca.sh
+ ```
+
+ This command downloads the setup script to `setup_ca.sh`.
+
+4. **Make the setup script executable:**
+
+ ```sh
+ chmod +x setup_ca.sh
+ ```
+
+ This command changes the permissions of `setup_ca.sh` to make it executable.
+
+5. **Run the setup script:**
+
+ ```sh
+ source ./setup_ca.sh
+ ```
+
+ This command executes the setup script in the current shell.
+
+6. **Start the redis server:**
+ ```sh
+ redis-server
+ ```
+ This command starts the redis server.
+
+## Capture the test cases
+
+1. **Start recording tests:**
+ ```bash
+ sudo -E env "PATH=$PATH" keploybin record -c 'python3 app.py'
+ ```
+
+## Let's Generate the test cases
+
+Make API Calls using Hoppscotch, Postman or cURL command. Keploy will capture those calls to generate test suites containing test cases and data mocks.
+
+1. Refer to flask-redis/api.txt to make api calls.
+
+2. **Observe terminal output:**
+ Let's go ahead and create a few more test cases for different endpoints!
+
+## Running the test cases
+
+1. **Start the application:**
+
+ ```bash
+ python3 app.py
+ ```
+
+2. **Run the recorded tests:**
+
+ ```bash
+ sudo -E env "PATH=$PATH" keploybin test -c 'python3 app.py' --delay 10
+ ```
+
+3. **Observe test run results:**
+ _Voila!! Our test cases have passed 🌟_
+
+---
+
+# Using Docker
+
+Since we have to setup our app using docker(make sure your docker is running)
+
+## Create a custom network for Keploy since we are using the Docker
+
+```bash
+docker network create keploy-network
+```
+
+## Capture the testcases
+
+We will run the keploy in record mode with docker-compose to start our application:-
+
+```bash
+keploy record -c "sudo docker-compose up" --containerName "flask-web"
+
+```
+
+#### Let's generate the testcases.
+
+Make API Calls using [Hoppscotch](https://hoppscotch.io), [Postman](https://postman.com) or curl command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
+
+1. Refer to flask-redis/api.txt to make api calls
+
+## Running the testcases
+
+```bash
+keploy test -c 'sudo docker-compose up' --containerName "flask-web" --delay 10
+```
+
+_Voila!! Our testcases has passed 🌟_
diff --git a/flask-redis/api.txt b/flask-redis/api.txt
new file mode 100644
index 0000000..68b4b23
--- /dev/null
+++ b/flask-redis/api.txt
@@ -0,0 +1,44 @@
+---------------------------------------------------------------------------------------------------
+// Add a Book
+
+curl -X POST http://localhost:5000/books/ \
+-H "Content-Type: application/json" \
+-d '{"title": "1984", "author": "George Orwell"}'
+
+---------------------------------------------------------------------------------------------------
+
+// Get All Books(with Pagination)
+
+curl -X GET "http://localhost:5000/books/?page=1&limit=10"
+
+---------------------------------------------------------------------------------------------------
+
+// Get Book Details
+
+curl -X GET http://localhost:5000/books/1
+
+---------------------------------------------------------------------------------------------------
+
+
+//Search Books by Title
+
+curl -X GET "http://localhost:5000/books/search?query=1984"
+
+
+---------------------------------------------------------------------------------------------------
+
+//Update a Book
+
+curl -X PUT http://localhost:5000/books/1 \
+-H "Content-Type: application/json" \
+-d '{"title": "1984 - Updated", "author": "George Orwell"}'
+
+
+---------------------------------------------------------------------------------------------------
+
+//Delete a Book
+
+curl -X DELETE http://localhost:5000/books/1
+
+---------------------------------------------------------------------------------------------------
+
diff --git a/flask-redis/app.py b/flask-redis/app.py
new file mode 100644
index 0000000..bf701d1
--- /dev/null
+++ b/flask-redis/app.py
@@ -0,0 +1,14 @@
+from flask import Flask
+from routes.book_routes import book
+
+app = Flask(__name__)
+
+# Register Blueprints
+app.register_blueprint(book, url_prefix="/books")
+
+@app.route('/', methods=['GET'])
+def hello():
+ return {"message": "Welcome to the Book Management System!"}, 200
+
+if __name__ == '__main__':
+ app.run(host='0.0.0.0', port=5000, debug=True)
diff --git a/flask-redis/docker-compose.yml b/flask-redis/docker-compose.yml
new file mode 100644
index 0000000..99a6016
--- /dev/null
+++ b/flask-redis/docker-compose.yml
@@ -0,0 +1,36 @@
+version: "3.8"
+
+services:
+ web:
+ build: .
+ container_name: flask-web
+ restart: always
+ ports:
+ - "5000:5000"
+ depends_on:
+ - redis
+ environment:
+ - FLASK_ENV=development
+ - REDIS_HOST=redis
+ - REDIS_PORT=6379
+ # volumes:
+ # - .:/usr/src/app
+ networks:
+ - keploy-network
+
+ redis:
+ image: "redis:alpine"
+ container_name: redis-server
+ restart: always
+ ports:
+ - "6379:6379"
+ # volumes:
+ # - db_data:/var/lib/redis
+ networks:
+ - keploy-network
+
+networks:
+ keploy-network:
+ external: true
+# volumes:
+# db_data:
diff --git a/flask-redis/dump.rdb b/flask-redis/dump.rdb
new file mode 100644
index 0000000..601ee4a
Binary files /dev/null and b/flask-redis/dump.rdb differ
diff --git a/flask-redis/keploy.yml b/flask-redis/keploy.yml
new file mode 100755
index 0000000..7b17386
--- /dev/null
+++ b/flask-redis/keploy.yml
@@ -0,0 +1,43 @@
+path: ""
+appId: 0
+appName: ""
+command: sudo docker-compose up
+port: 0
+dnsPort: 26789
+proxyPort: 16789
+debug: false
+disableTele: false
+disableANSI: false
+containerName: flask-web
+networkName: ""
+buildDelay: 30
+test:
+ selectedTests: {}
+ globalNoise:
+ global: {}
+ test-sets: {}
+ delay: 5
+ apiTimeout: 5
+ skipCoverage: false
+ coverageReportPath: ""
+ ignoreOrdering: true
+ mongoPassword: default@123
+ language: ""
+ removeUnusedMocks: false
+ fallBackOnMiss: false
+ jacocoAgentPath: ""
+ basePath: ""
+ mocking: true
+ ignoredTests: {}
+record:
+ filters: []
+ recordTimer: 0s
+configPath: ""
+bypassRules: []
+generateGithubActions: false
+keployContainer: keploy-v2
+keployNetwork: keploy-network
+cmdType: native
+inCi: false
+
+# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
diff --git a/flask-redis/keploy/reports/test-run-0/test-set-0-report.yaml b/flask-redis/keploy/reports/test-run-0/test-set-0-report.yaml
new file mode 100755
index 0000000..34f4af7
--- /dev/null
+++ b/flask-redis/keploy/reports/test-run-0/test-set-0-report.yaml
@@ -0,0 +1,606 @@
+version: api.keploy.io/v1beta1
+name: test-set-0-report
+status: PASSED
+success: 6
+failure: 0
+ignored: 0
+total: 6
+tests:
+ - kind: Http
+ name: test-set-0
+ status: PASSED
+ started: 1722636974
+ completed: 1722636974
+ test_case_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0
+ mock_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0/mocks
+ test_case_id: test-1
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://172.18.0.4:5000/books/
+ header:
+ Accept: '*/*'
+ Content-Length: "44"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: '{"title": "1984", "author": "George Orwell"}'
+ timestamp: 2024-08-02T22:15:10.596402605Z
+ resp:
+ status_code: 201
+ header:
+ Content-Length: "59"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:16:14 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "book_id": 1,
+ "message": "Book added successfully"
+ }
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 0001-01-01T00:00:00Z
+ noise:
+ header.Date: []
+ result:
+ status_code:
+ normal: true
+ expected: 201
+ actual: 201
+ headers_result:
+ - normal: true
+ expected:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ actual:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ - normal: true
+ expected:
+ key: Content-Length
+ value:
+ - "59"
+ actual:
+ key: Content-Length
+ value:
+ - "59"
+ - normal: true
+ expected:
+ key: Content-Type
+ value:
+ - application/json
+ actual:
+ key: Content-Type
+ value:
+ - application/json
+ - normal: true
+ expected:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:15:10 GMT
+ actual:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:16:14 GMT
+ body_result:
+ - normal: true
+ type: JSON
+ expected: |
+ {
+ "book_id": 1,
+ "message": "Book added successfully"
+ }
+ actual: |
+ {
+ "book_id": 1,
+ "message": "Book added successfully"
+ }
+ dep_result: []
+ - kind: Http
+ name: test-set-0
+ status: PASSED
+ started: 1722636974
+ completed: 1722636974
+ test_case_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0
+ mock_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0/mocks
+ test_case_id: test-2
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://172.18.0.4:5000/books/?page=1&limit=10
+ url_params:
+ limit: "10"
+ page: "1"
+ header:
+ Accept: '*/*'
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: ""
+ timestamp: 2024-08-02T22:15:17.339856691Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "88"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:16:14 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "books": [
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ ]
+ }
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 0001-01-01T00:00:00Z
+ noise:
+ header.Date: []
+ result:
+ status_code:
+ normal: true
+ expected: 200
+ actual: 200
+ headers_result:
+ - normal: true
+ expected:
+ key: Content-Type
+ value:
+ - application/json
+ actual:
+ key: Content-Type
+ value:
+ - application/json
+ - normal: true
+ expected:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:15:17 GMT
+ actual:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:16:14 GMT
+ - normal: true
+ expected:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ actual:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ - normal: true
+ expected:
+ key: Content-Length
+ value:
+ - "88"
+ actual:
+ key: Content-Length
+ value:
+ - "88"
+ body_result:
+ - normal: true
+ type: JSON
+ expected: |
+ {
+ "books": [
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ ]
+ }
+ actual: |
+ {
+ "books": [
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ ]
+ }
+ dep_result: []
+ - kind: Http
+ name: test-set-0
+ status: PASSED
+ started: 1722636974
+ completed: 1722636974
+ test_case_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0
+ mock_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0/mocks
+ test_case_id: test-3
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://172.18.0.4:5000/books/1
+ header:
+ Accept: '*/*'
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: ""
+ timestamp: 2024-08-02T22:15:24.919087736Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "51"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:16:14 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 0001-01-01T00:00:00Z
+ noise:
+ header.Date: []
+ result:
+ status_code:
+ normal: true
+ expected: 200
+ actual: 200
+ headers_result:
+ - normal: true
+ expected:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:15:24 GMT
+ actual:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:16:14 GMT
+ - normal: true
+ expected:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ actual:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ - normal: true
+ expected:
+ key: Content-Length
+ value:
+ - "51"
+ actual:
+ key: Content-Length
+ value:
+ - "51"
+ - normal: true
+ expected:
+ key: Content-Type
+ value:
+ - application/json
+ actual:
+ key: Content-Type
+ value:
+ - application/json
+ body_result:
+ - normal: true
+ type: JSON
+ expected: |
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ actual: |
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ dep_result: []
+ - kind: Http
+ name: test-set-0
+ status: PASSED
+ started: 1722636974
+ completed: 1722636974
+ test_case_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0
+ mock_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0/mocks
+ test_case_id: test-4
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://172.18.0.4:5000/books/search?query=1984
+ url_params:
+ query: "1984"
+ header:
+ Accept: '*/*'
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: ""
+ timestamp: 2024-08-02T22:15:32.960447823Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "90"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:16:14 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "results": [
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ ]
+ }
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 0001-01-01T00:00:00Z
+ noise:
+ header.Date: []
+ result:
+ status_code:
+ normal: true
+ expected: 200
+ actual: 200
+ headers_result:
+ - normal: true
+ expected:
+ key: Content-Length
+ value:
+ - "90"
+ actual:
+ key: Content-Length
+ value:
+ - "90"
+ - normal: true
+ expected:
+ key: Content-Type
+ value:
+ - application/json
+ actual:
+ key: Content-Type
+ value:
+ - application/json
+ - normal: true
+ expected:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:15:32 GMT
+ actual:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:16:14 GMT
+ - normal: true
+ expected:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ actual:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ body_result:
+ - normal: true
+ type: JSON
+ expected: |
+ {
+ "results": [
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ ]
+ }
+ actual: |
+ {
+ "results": [
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ ]
+ }
+ dep_result: []
+ - kind: Http
+ name: test-set-0
+ status: PASSED
+ started: 1722636974
+ completed: 1722636974
+ test_case_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0
+ mock_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0/mocks
+ test_case_id: test-5
+ req:
+ method: PUT
+ proto_major: 1
+ proto_minor: 1
+ url: http://172.18.0.4:5000/books/1
+ header:
+ Accept: '*/*'
+ Content-Length: "54"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: '{"title": "1984 - Updated", "author": "George Orwell"}'
+ timestamp: 2024-08-02T22:15:39.802018618Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "123"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:16:14 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "book": {
+ "author": "George Orwell",
+ "title": "1984 - Updated"
+ },
+ "message": "Book updated successfully"
+ }
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 0001-01-01T00:00:00Z
+ noise:
+ header.Date: []
+ result:
+ status_code:
+ normal: true
+ expected: 200
+ actual: 200
+ headers_result:
+ - normal: true
+ expected:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:15:39 GMT
+ actual:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:16:14 GMT
+ - normal: true
+ expected:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ actual:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ - normal: true
+ expected:
+ key: Content-Length
+ value:
+ - "123"
+ actual:
+ key: Content-Length
+ value:
+ - "123"
+ - normal: true
+ expected:
+ key: Content-Type
+ value:
+ - application/json
+ actual:
+ key: Content-Type
+ value:
+ - application/json
+ body_result:
+ - normal: true
+ type: JSON
+ expected: |
+ {
+ "book": {
+ "author": "George Orwell",
+ "title": "1984 - Updated"
+ },
+ "message": "Book updated successfully"
+ }
+ actual: |
+ {
+ "book": {
+ "author": "George Orwell",
+ "title": "1984 - Updated"
+ },
+ "message": "Book updated successfully"
+ }
+ dep_result: []
+ - kind: Http
+ name: test-set-0
+ status: PASSED
+ started: 1722636974
+ completed: 1722636974
+ test_case_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0
+ mock_path: /Users/amanrai/Desktop/flask-redis/keploy/test-set-0/mocks
+ test_case_id: test-6
+ req:
+ method: DELETE
+ proto_major: 1
+ proto_minor: 1
+ url: http://172.18.0.4:5000/books/1
+ header:
+ Accept: '*/*'
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: ""
+ timestamp: 2024-08-02T22:15:47.228393997Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "45"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:16:14 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "message": "Book deleted successfully"
+ }
+ status_message: ""
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 0001-01-01T00:00:00Z
+ noise:
+ header.Date: []
+ result:
+ status_code:
+ normal: true
+ expected: 200
+ actual: 200
+ headers_result:
+ - normal: true
+ expected:
+ key: Content-Length
+ value:
+ - "45"
+ actual:
+ key: Content-Length
+ value:
+ - "45"
+ - normal: true
+ expected:
+ key: Content-Type
+ value:
+ - application/json
+ actual:
+ key: Content-Type
+ value:
+ - application/json
+ - normal: true
+ expected:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:15:47 GMT
+ actual:
+ key: Date
+ value:
+ - Fri, 02 Aug 2024 22:16:14 GMT
+ - normal: true
+ expected:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ actual:
+ key: Server
+ value:
+ - Werkzeug/3.0.3 Python/3.10.14
+ body_result:
+ - normal: true
+ type: JSON
+ expected: |
+ {
+ "message": "Book deleted successfully"
+ }
+ actual: |
+ {
+ "message": "Book deleted successfully"
+ }
+ dep_result: []
+test_set: test-set-0
diff --git a/flask-redis/keploy/test-set-0/mocks.yaml b/flask-redis/keploy/test-set-0/mocks.yaml
new file mode 100755
index 0000000..1e3ba8b
--- /dev/null
+++ b/flask-redis/keploy/test-set-0/mocks.yaml
@@ -0,0 +1,417 @@
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-0
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*4\r\n$6\r\nCLIENT\r\n$7\r\nSETINFO\r\n$8\r\nLIB-NAME\r\n$8\r\nredis-py\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "+OK\r\n"
+ reqtimestampmock: 2024-08-02T22:15:10.6084523Z
+ restimestampmock: 2024-08-02T22:15:10.608930466Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-1
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*4\r\n$6\r\nCLIENT\r\n$7\r\nSETINFO\r\n$7\r\nLIB-VER\r\n$5\r\n5.0.8\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "+OK\r\n"
+ reqtimestampmock: 2024-08-02T22:15:10.610066633Z
+ restimestampmock: 2024-08-02T22:15:10.610752633Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-2
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*3\r\n$6\r\nINCRBY\r\n$7\r\nbook_id\r\n$1\r\n1\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: ":1\r\n"
+ reqtimestampmock: 2024-08-02T22:15:10.611978716Z
+ restimestampmock: 2024-08-02T22:15:10.612786841Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-3
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*6\r\n$4\r\nHSET\r\n$6\r\nbook:1\r\n$5\r\ntitle\r\n$4\r\n1984\r\n$6\r\nauthor\r\n$13\r\nGeorge Orwell\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: ":2\r\n"
+ reqtimestampmock: 2024-08-02T22:15:10.613938591Z
+ restimestampmock: 2024-08-02T22:15:10.614915925Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-4
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$3\r\nGET\r\n$18\r\nbooks_cache:page_1\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "$-1\r\n"
+ reqtimestampmock: 2024-08-02T22:15:17.343482553Z
+ restimestampmock: 2024-08-02T22:15:17.344991261Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-5
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$4\r\nKEYS\r\n$6\r\nbook:*\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "*1\r\n$6\r\nbook:1\r\n"
+ reqtimestampmock: 2024-08-02T22:15:17.345461178Z
+ restimestampmock: 2024-08-02T22:15:17.346119386Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-6
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$7\r\nHGETALL\r\n$6\r\nbook:1\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "*4\r\n$5\r\ntitle\r\n$4\r\n1984\r\n$6\r\nauthor\r\n$13\r\nGeorge Orwell\r\n"
+ reqtimestampmock: 2024-08-02T22:15:17.346484636Z
+ restimestampmock: 2024-08-02T22:15:17.346881469Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-7
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*4\r\n$5\r\nSETEX\r\n$18\r\nbooks_cache:page_1\r\n$3\r\n300\r\n$46\r\n[{\"title\": \"1984\", \"author\": \"George Orwell\"}]\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "+OK\r\n"
+ reqtimestampmock: 2024-08-02T22:15:17.347539428Z
+ restimestampmock: 2024-08-02T22:15:17.348107886Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-8
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$7\r\nHGETALL\r\n$6\r\nbook:1\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "*4\r\n$5\r\ntitle\r\n$4\r\n1984\r\n$6\r\nauthor\r\n$13\r\nGeorge Orwell\r\n"
+ reqtimestampmock: 2024-08-02T22:15:24.91868625Z
+ restimestampmock: 2024-08-02T22:15:24.918989625Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-9
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$3\r\nGET\r\n$17\r\nsearch:books:1984\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "$-1\r\n"
+ reqtimestampmock: 2024-08-02T22:15:32.959388379Z
+ restimestampmock: 2024-08-02T22:15:32.959604088Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-10
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$4\r\nKEYS\r\n$6\r\nbook:*\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "*1\r\n$6\r\nbook:1\r\n"
+ reqtimestampmock: 2024-08-02T22:15:32.959842713Z
+ restimestampmock: 2024-08-02T22:15:32.959998921Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-11
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$7\r\nHGETALL\r\n$6\r\nbook:1\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "*4\r\n$5\r\ntitle\r\n$4\r\n1984\r\n$6\r\nauthor\r\n$13\r\nGeorge Orwell\r\n"
+ reqtimestampmock: 2024-08-02T22:15:32.960231671Z
+ restimestampmock: 2024-08-02T22:15:32.960389213Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-12
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*4\r\n$5\r\nSETEX\r\n$17\r\nsearch:books:1984\r\n$3\r\n300\r\n$46\r\n[{\"title\": \"1984\", \"author\": \"George Orwell\"}]\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "+OK\r\n"
+ reqtimestampmock: 2024-08-02T22:15:32.960706004Z
+ restimestampmock: 2024-08-02T22:15:32.960838838Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-13
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$6\r\nEXISTS\r\n$6\r\nbook:1\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: ":1\r\n"
+ reqtimestampmock: 2024-08-02T22:15:39.801969841Z
+ restimestampmock: 2024-08-02T22:15:39.802299174Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-14
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*4\r\n$4\r\nHSET\r\n$6\r\nbook:1\r\n$5\r\ntitle\r\n$14\r\n1984 - Updated\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: ":0\r\n"
+ reqtimestampmock: 2024-08-02T22:15:39.802669008Z
+ restimestampmock: 2024-08-02T22:15:39.803126174Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-15
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*4\r\n$4\r\nHSET\r\n$6\r\nbook:1\r\n$6\r\nauthor\r\n$13\r\nGeorge Orwell\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: ":0\r\n"
+ reqtimestampmock: 2024-08-02T22:15:39.803492508Z
+ restimestampmock: 2024-08-02T22:15:39.803768216Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-16
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*3\r\n$4\r\nHGET\r\n$6\r\nbook:1\r\n$5\r\ntitle\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "$14\r\n1984 - Updated\r\n"
+ reqtimestampmock: 2024-08-02T22:15:39.804229258Z
+ restimestampmock: 2024-08-02T22:15:39.804523466Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-17
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*3\r\n$4\r\nHGET\r\n$6\r\nbook:1\r\n$6\r\nauthor\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "$13\r\nGeorge Orwell\r\n"
+ reqtimestampmock: 2024-08-02T22:15:39.805022091Z
+ restimestampmock: 2024-08-02T22:15:39.805174924Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-18
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*6\r\n$5\r\nHMSET\r\n$6\r\nbook:1\r\n$5\r\ntitle\r\n$14\r\n1984 - Updated\r\n$6\r\nauthor\r\n$13\r\nGeorge Orwell\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: "+OK\r\n"
+ reqtimestampmock: 2024-08-02T22:15:39.806458299Z
+ restimestampmock: 2024-08-02T22:15:39.807372758Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-19
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$6\r\nEXISTS\r\n$6\r\nbook:1\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: ":1\r\n"
+ reqtimestampmock: 2024-08-02T22:15:47.227235428Z
+ restimestampmock: 2024-08-02T22:15:47.227446803Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-20
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$3\r\nDEL\r\n$6\r\nbook:1\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: ":1\r\n"
+ reqtimestampmock: 2024-08-02T22:15:47.227812303Z
+ restimestampmock: 2024-08-02T22:15:47.228129511Z
+---
+version: api.keploy.io/v1beta1
+kind: Redis
+name: mock-21
+spec:
+ metadata:
+ type: config
+ redisrequests:
+ - origin: client
+ message:
+ - type: string
+ data: "*2\r\n$3\r\nDEL\r\n$18\r\nbooks_cache:page_*\r\n"
+ redisresponses:
+ - origin: server
+ message:
+ - type: string
+ data: ":0\r\n"
+ reqtimestampmock: 2024-08-02T22:15:47.228357053Z
+ restimestampmock: 2024-08-02T22:15:47.228491803Z
diff --git a/flask-redis/keploy/test-set-0/tests/test-1.yaml b/flask-redis/keploy/test-set-0/tests/test-1.yaml
new file mode 100755
index 0000000..ddc1544
--- /dev/null
+++ b/flask-redis/keploy/test-set-0/tests/test-1.yaml
@@ -0,0 +1,47 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/books/
+ header:
+ Accept: '*/*'
+ Content-Length: "44"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: '{"title": "1984", "author": "George Orwell"}'
+ timestamp: 2024-08-02T22:15:10.596402605Z
+ resp:
+ status_code: 201
+ header:
+ Content-Length: "59"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:15:10 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "book_id": 1,
+ "message": "Book added successfully"
+ }
+ status_message: Created
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-08-02T22:15:12.681157884Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1722636912
+curl: |-
+ curl --request POST \
+ --url http://localhost:5000/books/ \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:5000' \
+ --header 'User-Agent: curl/8.6.0' \
+ --data '{"title": "1984", "author": "George Orwell"}'
diff --git a/flask-redis/keploy/test-set-0/tests/test-2.yaml b/flask-redis/keploy/test-set-0/tests/test-2.yaml
new file mode 100755
index 0000000..85115b2
--- /dev/null
+++ b/flask-redis/keploy/test-set-0/tests/test-2.yaml
@@ -0,0 +1,50 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-2
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/books/?page=1&limit=10
+ url_params:
+ limit: "10"
+ page: "1"
+ header:
+ Accept: '*/*'
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: ""
+ timestamp: 2024-08-02T22:15:17.339856691Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "88"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:15:17 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "books": [
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ ]
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-08-02T22:15:19.428364137Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1722636919
+curl: |
+ curl --request GET \
+ --url http://localhost:5000/books/?page=1&limit=10 \
+ --header 'Host: localhost:5000' \
+ --header 'User-Agent: curl/8.6.0' \
+ --header 'Accept: */*' \
diff --git a/flask-redis/keploy/test-set-0/tests/test-3.yaml b/flask-redis/keploy/test-set-0/tests/test-3.yaml
new file mode 100755
index 0000000..316a90d
--- /dev/null
+++ b/flask-redis/keploy/test-set-0/tests/test-3.yaml
@@ -0,0 +1,43 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-3
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/books/1
+ header:
+ Accept: '*/*'
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: ""
+ timestamp: 2024-08-02T22:15:24.919087736Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "51"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:15:24 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-08-02T22:15:26.965315001Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1722636926
+curl: |
+ curl --request GET \
+ --url http://localhost:5000/books/1 \
+ --header 'Accept: */*' \
+ --header 'Host: localhost:5000' \
+ --header 'User-Agent: curl/8.6.0' \
diff --git a/flask-redis/keploy/test-set-0/tests/test-4.yaml b/flask-redis/keploy/test-set-0/tests/test-4.yaml
new file mode 100755
index 0000000..e659f2f
--- /dev/null
+++ b/flask-redis/keploy/test-set-0/tests/test-4.yaml
@@ -0,0 +1,49 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-4
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/books/search?query=1984
+ url_params:
+ query: "1984"
+ header:
+ Accept: '*/*'
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: ""
+ timestamp: 2024-08-02T22:15:32.960447823Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "90"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:15:32 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "results": [
+ {
+ "author": "George Orwell",
+ "title": "1984"
+ }
+ ]
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-08-02T22:15:34.98447863Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1722636934
+curl: |
+ curl --request GET \
+ --url http://localhost:5000/books/search?query=1984 \
+ --header 'Host: localhost:5000' \
+ --header 'User-Agent: curl/8.6.0' \
+ --header 'Accept: */*' \
diff --git a/flask-redis/keploy/test-set-0/tests/test-5.yaml b/flask-redis/keploy/test-set-0/tests/test-5.yaml
new file mode 100755
index 0000000..7f38a10
--- /dev/null
+++ b/flask-redis/keploy/test-set-0/tests/test-5.yaml
@@ -0,0 +1,50 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-5
+spec:
+ metadata: {}
+ req:
+ method: PUT
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/books/1
+ header:
+ Accept: '*/*'
+ Content-Length: "54"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: '{"title": "1984 - Updated", "author": "George Orwell"}'
+ timestamp: 2024-08-02T22:15:39.802018618Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "123"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:15:39 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "book": {
+ "author": "George Orwell",
+ "title": "1984 - Updated"
+ },
+ "message": "Book updated successfully"
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-08-02T22:15:41.813988842Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1722636941
+curl: |-
+ curl --request PUT \
+ --url http://localhost:5000/books/1 \
+ --header 'Host: localhost:5000' \
+ --header 'User-Agent: curl/8.6.0' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data '{"title": "1984 - Updated", "author": "George Orwell"}'
diff --git a/flask-redis/keploy/test-set-0/tests/test-6.yaml b/flask-redis/keploy/test-set-0/tests/test-6.yaml
new file mode 100755
index 0000000..228ce8e
--- /dev/null
+++ b/flask-redis/keploy/test-set-0/tests/test-6.yaml
@@ -0,0 +1,42 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-6
+spec:
+ metadata: {}
+ req:
+ method: DELETE
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/books/1
+ header:
+ Accept: '*/*'
+ Host: localhost:5000
+ User-Agent: curl/8.6.0
+ body: ""
+ timestamp: 2024-08-02T22:15:47.228393997Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "45"
+ Content-Type: application/json
+ Date: Fri, 02 Aug 2024 22:15:47 GMT
+ Server: Werkzeug/3.0.3 Python/3.10.14
+ body: |
+ {
+ "message": "Book deleted successfully"
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-08-02T22:15:49.269456095Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1722636949
+curl: |
+ curl --request DELETE \
+ --url http://localhost:5000/books/1 \
+ --header 'Accept: */*' \
+ --header 'Host: localhost:5000' \
+ --header 'User-Agent: curl/8.6.0' \
diff --git a/flask-redis/redisClient.py b/flask-redis/redisClient.py
new file mode 100644
index 0000000..dc01e64
--- /dev/null
+++ b/flask-redis/redisClient.py
@@ -0,0 +1,12 @@
+import redis
+import os
+
+# Connect to Redis server
+client = redis.Redis(
+ host=os.getenv('REDIS_HOST', 'localhost'),
+ port=int(os.getenv('REDIS_PORT', 6379)),
+ db=0
+)
+
+def get_redis_client():
+ return client
diff --git a/flask-redis/requirements.txt b/flask-redis/requirements.txt
new file mode 100644
index 0000000..bdb539d
--- /dev/null
+++ b/flask-redis/requirements.txt
@@ -0,0 +1,3 @@
+Flask
+redis
+python-dotenv
\ No newline at end of file
diff --git a/flask-redis/routes/book_routes.py b/flask-redis/routes/book_routes.py
new file mode 100644
index 0000000..6d58543
--- /dev/null
+++ b/flask-redis/routes/book_routes.py
@@ -0,0 +1,133 @@
+from flask import Blueprint, request, jsonify
+from redisClient import get_redis_client
+import json
+
+book = Blueprint('book', __name__)
+redis_client = get_redis_client()
+
+@book.route('/', methods=['POST'])
+def add_book():
+ data = request.get_json()
+ title = data.get('title')
+ author = data.get('author')
+
+ if not title or not author:
+ return jsonify({"error": "Title and author are required"}), 400
+
+ book_id = redis_client.incr('book_id') # Auto-increment ID for new book
+ redis_client.hset(f'book:{book_id}', mapping={"title": title, "author": author})
+
+ return jsonify({"message": "Book added successfully", "book_id": book_id}), 201
+
+
+@book.route('/', methods=['GET'])
+def get_books():
+ page = int(request.args.get('page', 1))
+ limit = int(request.args.get('limit', 10))
+ start = (page - 1) * limit
+ end = start + limit - 1
+
+ # Define your cache key here
+ cache_key = f'books_cache:page_{page}'
+
+ # Check if the result is already in cache
+ cached_books = redis_client.get(cache_key)
+ if cached_books:
+ return jsonify(json.loads(cached_books)), 200
+
+ # If not cached, fetch from Redis
+ keys = redis_client.keys('book:*')
+ books = [
+ {k.decode('utf-8'): v.decode('utf-8') for k, v in redis_client.hgetall(key).items()}
+ for key in keys
+ ]
+ redis_client.setex(cache_key, 300, json.dumps(books))
+
+ return jsonify({"books": books}), 200
+
+
+@book.route('/', methods=['GET'])
+def get_book(book_id):
+ # Create a cache key based on the book ID
+ cache_key = f'book:{book_id}'
+
+ # Check if the key exists in the cache
+ cached_book = redis_client.hgetall(cache_key) # Use hgetall for hash
+
+ if cached_book:
+ # Decode the keys and values from bytes to strings
+ decoded_book = {key.decode('utf-8'): value.decode('utf-8') for key, value in cached_book.items()}
+ return jsonify(decoded_book), 200
+ else:
+ return jsonify({"message": "Book not found"}), 404
+
+
+@book.route('/', methods=['PUT'])
+def update_book(book_id):
+ data = request.get_json()
+ title = data.get('title')
+ author = data.get('author')
+
+ if not redis_client.exists(f'book:{book_id}'):
+ return jsonify({"error": "Book not found"}), 404
+
+ if title:
+ redis_client.hset(f'book:{book_id}', "title", title)
+ if author:
+ redis_client.hset(f'book:{book_id}', "author", author)
+
+ # Retrieve the updated book data
+ updated_book = {
+ "title": redis_client.hget(f'book:{book_id}', "title").decode('utf-8'),
+ "author": redis_client.hget(f'book:{book_id}', "author").decode('utf-8')
+ }
+
+ # Update the cache with the latest data
+ redis_client.hmset(f'book:{book_id}', updated_book)
+
+ return jsonify({"message": "Book updated successfully", "book": updated_book}), 200
+
+
+
+@book.route('/', methods=['DELETE'])
+def delete_book(book_id):
+ # Check if the book exists
+ if not redis_client.exists(f'book:{book_id}'):
+ return jsonify({"message": "Book not found"}), 404
+
+ # Delete the book
+ redis_client.delete(f'book:{book_id}')
+
+ # Invalidate related caches
+ redis_client.delete(f'books_cache:page_*') # Adjust this if you cache other items
+
+ return jsonify({"message": "Book deleted successfully"}), 200
+
+@book.route('/search', methods=['GET'])
+def search_books():
+ query = request.args.get('query', '')
+
+ if not query:
+ return jsonify({"error": "Search query is required"}), 400
+
+ cache_key = f'search:books:{query}'
+ cached_results = redis_client.get(cache_key)
+
+ if cached_results:
+ return jsonify(json.loads(cached_results)), 200
+
+ all_books = redis_client.keys(f'book:*')
+ search_results = []
+
+ for book_key in all_books:
+ book_data = redis_client.hgetall(book_key)
+ title = book_data[b'title'].decode('utf-8')
+ author = book_data[b'author'].decode('utf-8')
+ if query.lower() in title.lower():
+ search_results.append({"title": title, "author": author})
+
+ # Store search results in cache
+ redis_client.setex(cache_key, 300, json.dumps(search_results)) # Cache for 5 minutes
+
+ return jsonify({"results": search_results}), 200
+
diff --git a/flask_postgresql_app/.env b/flask_postgresql_app/.env
new file mode 100644
index 0000000..e6f528c
--- /dev/null
+++ b/flask_postgresql_app/.env
@@ -0,0 +1,2 @@
+FLASK_ENV=development
+DATABASE_URL=postgresql://flaskuser:password@db:5432/flaskdb
diff --git a/flask_postgresql_app/Dockerfile b/flask_postgresql_app/Dockerfile
new file mode 100644
index 0000000..9c4f754
--- /dev/null
+++ b/flask_postgresql_app/Dockerfile
@@ -0,0 +1,18 @@
+
+FROM python:3.9-slim
+
+
+WORKDIR /usr/src/app
+
+COPY requirements.txt ./
+RUN pip install --no-cache-dir -r requirements.txt
+
+# Copy the rest of the working directory contents
+COPY . .
+
+EXPOSE 5000
+
+# env
+ENV FLASK_APP=app.py
+
+CMD ["flask", "run", "--host=0.0.0.0"]
diff --git a/flask_postgresql_app/README.md b/flask_postgresql_app/README.md
new file mode 100644
index 0000000..e41dbc3
--- /dev/null
+++ b/flask_postgresql_app/README.md
@@ -0,0 +1,81 @@
+# User Management API
+
+
+## Overview
+
+This is a Flask-based web application that uses PostgreSQL as its database. The project is containerized using Docker and Docker Compose for easy deployment and management.
+The endpoints available will be:
+
+1. `GET /` - Home Route
+2. `GET /users` - List all users
+3. `POST /users` - Create a new user
+4. `PUT /users/` - Update a user
+5. `DELETE /users//` - Delete a user
+
+
+
+## Setup Instructions
+
+1. Clone the repository and navigate to project directory.
+ ```bash
+ git clone https://github.com/keploy/samples-python.git
+ cd samples-python/flask_postgresql_app
+ ```
+2. Install Keploy.
+ ```bash
+ curl --silent -O -L https://keploy.io/install.sh && source install.sh
+ ```
+3. Build and run the Docker containers:
+ ```bash
+ docker compose up --build
+ ```
+4. Access the application:
+ Once the containers are running, the Flask app will be available at:
+ ```bash
+ http://localhost:5000
+ ```
+5. Capture the testcases.
+ ```bash
+ keploy record -c "docker compose up" --container-name "flask_web_app"
+ ```
+6. Generate testcases by making API calls.
+ ### Home Route
+ # GET /
+ ```bash
+ curl -X GET http://localhost:5000
+ ```
+ ```bash
+ # Retrieves a list of all users.
+ # GET /users
+ curl -X GET http://localhost:5000/users \
+ ```
+ ```bash
+ # Create a new user by providing a name.
+ # POST /users
+ curl -X POST http://localhost:5000/users -H "Content-Type: application/json" -d '{"name": "Harsh"}'
+
+ ```
+ ```bash
+ # Retrieve a user by their ID.
+ # GET /users/
+ curl -X GET http://localhost:8000/users// \
+
+ ```
+ ```bash
+ # Update the name of a user by their ID.
+ # PUT /users/
+ curl -X PUT http://localhost:5000/users/ -H "Content-Type: application/json" -d '{"name": "Updated Name"}'
+ ```
+ ```bash
+ # Delete a user by their ID
+ # DELETE /
+ curl -X DELETE http://localhost:5000/users/
+ ```
+ ```bash
+ Replace `` with the actual ID of the item you want to retrieve, update, or delete.
+
+## Run the testcases
+```bash
+keploy test -c "docker compose up" --container-name "flask_web_app"
+```
+
diff --git a/flask_postgresql_app/app.py b/flask_postgresql_app/app.py
new file mode 100644
index 0000000..cce0ca9
--- /dev/null
+++ b/flask_postgresql_app/app.py
@@ -0,0 +1,77 @@
+from flask import Flask, jsonify, request
+from flask_sqlalchemy import SQLAlchemy
+from dotenv import load_dotenv
+import os
+
+# Load environment variables from .env file
+load_dotenv()
+
+app = Flask(__name__)
+app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL')
+app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
+
+db = SQLAlchemy(app)
+
+class User(db.Model):
+ __tablename__ = 'users'
+ id = db.Column(db.Integer, primary_key=True)
+ name = db.Column(db.String(80), nullable=False)
+
+ def __init__(self, name):
+ self.name = name
+
+# Create the database tables
+@app.before_request
+def create_tables():
+ db.create_all()
+
+# Home route
+@app.route('/', methods=['GET'])
+def home():
+ return jsonify({"message": "Welcome to the User Management API!"}), 200
+
+# GET all users
+@app.route('/users', methods=['GET'])
+def get_users():
+ users = User.query.all()
+ return jsonify([{'id': user.id, 'name': user.name} for user in users])
+
+# POST a new user
+@app.route('/users', methods=['POST'])
+def add_user():
+ name = request.json.get('name')
+ if not name:
+ return jsonify({"error": "Name is required."}), 400
+ user = User(name=name)
+ db.session.add(user)
+ db.session.commit()
+ return jsonify({"message": f"User {name} added.", "id": user.id}), 201
+
+# PUT to update a user
+@app.route('/users/', methods=['PUT'])
+def update_user(id):
+ user = User.query.get(id)
+ if user is None:
+ return jsonify({"error": "User not found."}), 404
+
+ name = request.json.get('name')
+ if name:
+ user.name = name
+ db.session.commit()
+ return jsonify({"message": f"User {id} updated."})
+
+ return jsonify({"error": "Name is required."}), 400
+
+# DELETE a user
+@app.route('/users/', methods=['DELETE'])
+def delete_user(id):
+ user = User.query.get(id)
+ if user is None:
+ return jsonify({"error": "User not found."}), 404
+
+ db.session.delete(user)
+ db.session.commit()
+ return jsonify({"message": f"User {id} deleted."})
+
+if __name__ == "__main__":
+ app.run(host="0.0.0.0", port=5000)
diff --git a/flask_postgresql_app/docker-compose.yml b/flask_postgresql_app/docker-compose.yml
new file mode 100644
index 0000000..f35f9c5
--- /dev/null
+++ b/flask_postgresql_app/docker-compose.yml
@@ -0,0 +1,23 @@
+services:
+ web:
+ build: .
+ container_name: flask_web_app
+ ports:
+ - "5000:5000"
+ environment:
+ - DATABASE_URL=postgresql://flaskuser:password@db:5432/flaskdb
+ - FLASK_APP=app.py # Ensure Flask app is specified
+ - FLASK_ENV=development
+ command: flask run --host=0.0.0.0 # Ensure Flask runs with the correct host
+ depends_on:
+ - db
+
+ db:
+ image: postgres:13
+ container_name: flask_db
+ environment:
+ POSTGRES_DB: flaskdb
+ POSTGRES_USER: flaskuser
+ POSTGRES_PASSWORD: password
+ ports:
+ - "5432:5432"
diff --git a/flask_postgresql_app/keploy.yml b/flask_postgresql_app/keploy.yml
new file mode 100755
index 0000000..4a2a998
--- /dev/null
+++ b/flask_postgresql_app/keploy.yml
@@ -0,0 +1,61 @@
+path: ""
+appId: 0
+appName: flask_postgresql_app
+command: docker compose up --build
+templatize:
+ testSets: []
+port: 0
+dnsPort: 26789
+proxyPort: 16789
+debug: false
+disableTele: false
+disableANSI: false
+containerName: flask_postgresql_app
+networkName: ""
+buildDelay: 30
+test:
+ selectedTests: {}
+ globalNoise:
+ global: {}
+ test-sets: {}
+ delay: 5
+ host: ""
+ port: 0
+ apiTimeout: 5
+ skipCoverage: false
+ coverageReportPath: ""
+ ignoreOrdering: true
+ mongoPassword: default@123
+ language: ""
+ removeUnusedMocks: false
+ fallBackOnMiss: false
+ jacocoAgentPath: ""
+ basePath: ""
+ mocking: true
+ ignoredTests: {}
+ disableLineCoverage: false
+ disableMockUpload: true
+ useLocalMock: false
+ updateTemplate: false
+record:
+ filters: []
+ recordTimer: 0s
+configPath: ""
+bypassRules: []
+generateGithubActions: false
+keployContainer: keploy-v2
+keployNetwork: keploy-network
+cmdType: native
+contract:
+ services: []
+ tests: []
+ path: ""
+ download: false
+ generate: false
+ driven: consumer
+ mappings:
+ servicesMapping: {}
+ self: ""
+inCi: false
+
+# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
diff --git a/flask_postgresql_app/keploy/.gitignore b/flask_postgresql_app/keploy/.gitignore
new file mode 100644
index 0000000..5137843
--- /dev/null
+++ b/flask_postgresql_app/keploy/.gitignore
@@ -0,0 +1,2 @@
+
+/reports/
diff --git a/flask_postgresql_app/keploy/test-set-0/mocks.yaml b/flask_postgresql_app/keploy/test-set-0/mocks.yaml
new file mode 100755
index 0000000..2fb48be
--- /dev/null
+++ b/flask_postgresql_app/keploy/test-set-0/mocks.yaml
@@ -0,0 +1,1246 @@
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-0
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.830573028Z
+ restimestampmock: 2024-10-09T16:52:02.831244867Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-1
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAKQADAAB1c2VyAGZsYXNrdXNlcgBkYXRhYmFzZQBmbGFza2RiAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [133, 3, 221, 191]
+ msg_type: 82
+ auth_type: 5
+ reqtimestampmock: 2024-10-09T16:52:02.831996616Z
+ restimestampmock: 2024-10-09T16:52:02.832039452Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-2
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [p]
+ identifier: ClientRequest
+ length: 8
+ password_message:
+ password: md5e9ccf75670af20adf7c4e48379bb8588
+ msg_type: 112
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 34
+ secret_key: 2476999767
+ parameter_status:
+ - name: application_name
+ value: ""
+ - name: client_encoding
+ value: UTF8
+ - name: DateStyle
+ value: ISO, MDY
+ - name: integer_datetimes
+ value: "on"
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "on"
+ - name: server_encoding
+ value: UTF8
+ - name: server_version
+ value: 13.16 (Debian 13.16-1.pgdg120+1)
+ - name: session_authorization
+ value: flaskuser
+ - name: standard_conforming_strings
+ value: "on"
+ - name: TimeZone
+ value: Etc/UTC
+ - name: TimeZone
+ value: Etc/UTC
+ - name: TimeZone
+ value: Etc/UTC
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.835642375Z
+ restimestampmock: 2024-10-09T16:52:02.835723939Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-3
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: BEGIN
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: BEGIN
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.836164161Z
+ restimestampmock: 2024-10-09T16:52:02.83619432Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-4
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ payload: UQAAAHdTRUxFQ1QgdC5vaWQsIHR5cGFycmF5CkZST00gcGdfdHlwZSB0IEpPSU4gcGdfbmFtZXNwYWNlIG5zCiAgICBPTiB0eXBuYW1lc3BhY2UgPSBucy5vaWQKV0hFUkUgdHlwbmFtZSA9ICdoc3RvcmUnOwoA
+ query:
+ string: 'SELECT t.oid, typarray FROM pg_type t JOIN pg_namespace ns ON typnamespace = ns.oid WHERE typname = ''hstore''; '
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 0
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: oid, table_oid: 1247, table_attribute_number: 1, data_type_oid: 26, data_type_size: 4, type_modifier: -1, format: 0}, {field_name: typarray, table_oid: 1247, table_attribute_number: 14, data_type_oid: 26, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.837461213Z
+ restimestampmock: 2024-10-09T16:52:02.837501512Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-5
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: ROLLBACK
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: ROLLBACK
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.837848953Z
+ restimestampmock: 2024-10-09T16:52:02.837885486Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-6
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: BEGIN
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: BEGIN
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.838418843Z
+ restimestampmock: 2024-10-09T16:52:02.838454616Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-7
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: select version()
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ data_row: [{row_values: ['PostgreSQL 13.16 (Debian 13.16-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit']}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: version, table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.838665794Z
+ restimestampmock: 2024-10-09T16:52:02.838698521Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-8
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: select current_schema()
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ data_row: [{row_values: [public]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: current_schema, table_oid: 0, table_attribute_number: 0, data_type_oid: 19, data_type_size: 64, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.839613853Z
+ restimestampmock: 2024-10-09T16:52:02.839662169Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-9
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: show transaction isolation level
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SHOW
+ data_row: [{row_values: [read committed]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: transaction_isolation, table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.83998089Z
+ restimestampmock: 2024-10-09T16:52:02.840014622Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-10
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ data_row: [{row_values: [test plain returns]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: anon_1, table_oid: 0, table_attribute_number: 0, data_type_oid: 1043, data_type_size: -1, type_modifier: 64, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.841477739Z
+ restimestampmock: 2024-10-09T16:52:02.84152715Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-11
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ data_row: [{row_values: [test unicode returns]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: anon_1, table_oid: 0, table_attribute_number: 0, data_type_oid: 1043, data_type_size: -1, type_modifier: 64, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.842010391Z
+ restimestampmock: 2024-10-09T16:52:02.84203208Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-12
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: show standard_conforming_strings
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SHOW
+ data_row: [{row_values: ["on"]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: standard_conforming_strings, table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.842246434Z
+ restimestampmock: 2024-10-09T16:52:02.842285151Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-13
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: ROLLBACK
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: ROLLBACK
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.842554536Z
+ restimestampmock: 2024-10-09T16:52:02.842597306Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-14
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: BEGIN
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: BEGIN
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.84341846Z
+ restimestampmock: 2024-10-09T16:52:02.84347898Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-15
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname='users'
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ data_row: [{row_values: [users]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: relname, table_oid: 1259, table_attribute_number: 2, data_type_oid: 19, data_type_size: 64, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.844216679Z
+ restimestampmock: 2024-10-09T16:52:02.844269317Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-16
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: ROLLBACK
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: ROLLBACK
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:02.844850035Z
+ restimestampmock: 2024-10-09T16:52:02.844879734Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-17
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: BEGIN
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: BEGIN
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:15.942120188Z
+ restimestampmock: 2024-10-09T16:52:15.942255625Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-18
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: INSERT INTO users (name) VALUES ('harshjoshi') RETURNING users.id
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: INSERT 0 1
+ data_row: [{row_values: ["5"]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: id, table_oid: 16387, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:15.943656569Z
+ restimestampmock: 2024-10-09T16:52:15.943699019Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-19
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: COMMIT
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: COMMIT
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:15.948172194Z
+ restimestampmock: 2024-10-09T16:52:15.948306699Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-20
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: BEGIN
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: BEGIN
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:15.950999349Z
+ restimestampmock: 2024-10-09T16:52:15.951212649Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-21
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ payload: UQAAAFpTRUxFQ1QgdXNlcnMuaWQgQVMgdXNlcnNfaWQsIHVzZXJzLm5hbWUgQVMgdXNlcnNfbmFtZSAKRlJPTSB1c2VycyAKV0hFUkUgdXNlcnMuaWQgPSA1AA==
+ query:
+ string: SELECT users.id AS users_id, users.name AS users_name FROM users WHERE users.id = 5
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ data_row: [{row_values: ["5", harshjoshi]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: users_id, table_oid: 16387, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {field_name: users_name, table_oid: 16387, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: 84, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:15.960229809Z
+ restimestampmock: 2024-10-09T16:52:15.960468611Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-22
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: ROLLBACK
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: ROLLBACK
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:15.964142202Z
+ restimestampmock: 2024-10-09T16:52:15.964294111Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-23
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: BEGIN
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: BEGIN
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:24.27538668Z
+ restimestampmock: 2024-10-09T16:52:24.275522488Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-24
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ payload: UQAAAFpTRUxFQ1QgdXNlcnMuaWQgQVMgdXNlcnNfaWQsIHVzZXJzLm5hbWUgQVMgdXNlcnNfbmFtZSAKRlJPTSB1c2VycyAKV0hFUkUgdXNlcnMuaWQgPSA1AA==
+ query:
+ string: SELECT users.id AS users_id, users.name AS users_name FROM users WHERE users.id = 5
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ data_row: [{row_values: ["5", harshjoshi]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: users_id, table_oid: 16387, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {field_name: users_name, table_oid: 16387, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: 84, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:24.276356632Z
+ restimestampmock: 2024-10-09T16:52:24.276478637Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-25
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: UPDATE users SET name='harshjoshi1' WHERE users.id = 5
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: UPDATE 1
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:24.278842896Z
+ restimestampmock: 2024-10-09T16:52:24.278889652Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-26
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: COMMIT
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: COMMIT
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:24.281524213Z
+ restimestampmock: 2024-10-09T16:52:24.281569809Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-27
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: BEGIN
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: BEGIN
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:29.150281172Z
+ restimestampmock: 2024-10-09T16:52:29.150394831Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-28
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ payload: UQAAAFpTRUxFQ1QgdXNlcnMuaWQgQVMgdXNlcnNfaWQsIHVzZXJzLm5hbWUgQVMgdXNlcnNfbmFtZSAKRlJPTSB1c2VycyAKV0hFUkUgdXNlcnMuaWQgPSA1AA==
+ query:
+ string: SELECT users.id AS users_id, users.name AS users_name FROM users WHERE users.id = 5
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ data_row: [{row_values: ["5", harshjoshi1]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: users_id, table_oid: 16387, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {field_name: users_name, table_oid: 16387, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: 84, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:29.151126001Z
+ restimestampmock: 2024-10-09T16:52:29.151159414Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-29
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: DELETE FROM users WHERE users.id = 5
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: DELETE 1
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:29.152177132Z
+ restimestampmock: 2024-10-09T16:52:29.1522471Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-30
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: COMMIT
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: COMMIT
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:29.154192548Z
+ restimestampmock: 2024-10-09T16:52:29.154266201Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-31
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: BEGIN
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: BEGIN
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:34.320529598Z
+ restimestampmock: 2024-10-09T16:52:34.320605115Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-32
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ payload: UQAAAEZTRUxFQ1QgdXNlcnMuaWQgQVMgdXNlcnNfaWQsIHVzZXJzLm5hbWUgQVMgdXNlcnNfbmFtZSAKRlJPTSB1c2VycwA=
+ query:
+ string: SELECT users.id AS users_id, users.name AS users_name FROM users
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ data_row: [{row_values: ["4", harsh]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: users_id, table_oid: 16387, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {field_name: users_name, table_oid: 16387, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: 84, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:34.321330701Z
+ restimestampmock: 2024-10-09T16:52:34.321478797Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-33
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: ROLLBACK
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: ROLLBACK
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:34.323701768Z
+ restimestampmock: 2024-10-09T16:52:34.323826848Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-34
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: BEGIN
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: BEGIN
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:49.282145701Z
+ restimestampmock: 2024-10-09T16:52:49.282269829Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-35
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ payload: UQAAAFpTRUxFQ1QgdXNlcnMuaWQgQVMgdXNlcnNfaWQsIHVzZXJzLm5hbWUgQVMgdXNlcnNfbmFtZSAKRlJPTSB1c2VycyAKV0hFUkUgdXNlcnMuaWQgPSA0AA==
+ query:
+ string: SELECT users.id AS users_id, users.name AS users_name FROM users WHERE users.id = 4
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ data_row: [{row_values: ["4", harsh]}]
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: users_id, table_oid: 16387, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {field_name: users_name, table_oid: 16387, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: 84, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:49.282941176Z
+ restimestampmock: 2024-10-09T16:52:49.283010044Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-36
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: DELETE FROM users WHERE users.id = 4
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: DELETE 1
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:49.284580663Z
+ restimestampmock: 2024-10-09T16:52:49.284602152Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-37
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: COMMIT
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: COMMIT
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:49.286666457Z
+ restimestampmock: 2024-10-09T16:52:49.286736895Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-38
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: BEGIN
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: BEGIN
+ ready_for_query:
+ txstatus: 84
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:56.967044619Z
+ restimestampmock: 2024-10-09T16:52:56.967123063Z
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-39
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ payload: UQAAAEZTRUxFQ1QgdXNlcnMuaWQgQVMgdXNlcnNfaWQsIHVzZXJzLm5hbWUgQVMgdXNlcnNfbmFtZSAKRlJPTSB1c2VycwA=
+ query:
+ string: SELECT users.id AS users_id, users.name AS users_name FROM users
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 0
+ ready_for_query:
+ txstatus: 84
+ row_description: {fields: [{field_name: users_id, table_oid: 16387, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {field_name: users_name, table_oid: 16387, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: 84, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-10-09T16:52:56.96770962Z
+ restimestampmock: 2024-10-09T16:52:56.967773952Z
+connectionId: "0"
diff --git a/flask_postgresql_app/keploy/test-set-0/tests/test-1.yaml b/flask_postgresql_app/keploy/test-set-0/tests/test-1.yaml
new file mode 100755
index 0000000..6e22f8a
--- /dev/null
+++ b/flask_postgresql_app/keploy/test-set-0/tests/test-1.yaml
@@ -0,0 +1,53 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/
+ header:
+ Accept: '*/*'
+ Accept-Encoding: gzip, deflate, br
+ Connection: close
+ Content-Length: "25"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: Thunder Client (https://www.thunderclient.com)
+ body: |-
+ {
+ "name":"harshjoshi"
+ }
+ timestamp: 2024-10-09T16:52:02.809644362Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "55"
+ Content-Type: application/json
+ Date: Wed, 09 Oct 2024 16:52:02 GMT
+ Server: Werkzeug/2.0.1 Python/3.9.20
+ body: |
+ {
+ "message": "Welcome to the User Management API!"
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-09T16:52:04.856965925Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1728492724
+curl: |-
+ curl --request GET \
+ --url http://localhost:5000/ \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --header 'Accept: */*' \
+ --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:5000' \
+ --header 'Connection: close' \
+ --data "{\n \"name\":\"harshjoshi\"\n}"
diff --git a/flask_postgresql_app/keploy/test-set-0/tests/test-2.yaml b/flask_postgresql_app/keploy/test-set-0/tests/test-2.yaml
new file mode 100755
index 0000000..ca56fc9
--- /dev/null
+++ b/flask_postgresql_app/keploy/test-set-0/tests/test-2.yaml
@@ -0,0 +1,50 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-2
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/users
+ header:
+ Accept: '*/*'
+ Accept-Encoding: gzip, deflate, br
+ Connection: close
+ Content-Length: "25"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: Thunder Client (https://www.thunderclient.com)
+ body: |-
+ {
+ "name":"harshjoshi"
+ }
+ timestamp: 2024-10-09T16:52:15.936436966Z
+ resp:
+ status_code: 201
+ header:
+ Content-Length: "54"
+ Content-Type: application/json
+ Date: Wed, 09 Oct 2024 16:52:15 GMT
+ Server: Werkzeug/2.0.1 Python/3.9.20
+ body: "{\n \"id\": 5, \n \"message\": \"User harshjoshi added.\"\n}\n"
+ status_message: Created
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-09T16:52:18.022153619Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1728492738
+curl: |-
+ curl --request POST \
+ --url http://localhost:5000/users \
+ --header 'Accept: */*' \
+ --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:5000' \
+ --header 'Connection: close' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --data "{\n \"name\":\"harshjoshi\"\n}"
diff --git a/flask_postgresql_app/keploy/test-set-0/tests/test-3.yaml b/flask_postgresql_app/keploy/test-set-0/tests/test-3.yaml
new file mode 100755
index 0000000..f99ce73
--- /dev/null
+++ b/flask_postgresql_app/keploy/test-set-0/tests/test-3.yaml
@@ -0,0 +1,53 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-3
+spec:
+ metadata: {}
+ req:
+ method: PUT
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/users/5
+ header:
+ Accept: '*/*'
+ Accept-Encoding: gzip, deflate, br
+ Connection: close
+ Content-Length: "26"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: Thunder Client (https://www.thunderclient.com)
+ body: |-
+ {
+ "name":"harshjoshi1"
+ }
+ timestamp: 2024-10-09T16:52:24.271748853Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "35"
+ Content-Type: application/json
+ Date: Wed, 09 Oct 2024 16:52:24 GMT
+ Server: Werkzeug/2.0.1 Python/3.9.20
+ body: |
+ {
+ "message": "User 5 updated."
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-09T16:52:26.3624278Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1728492746
+curl: |-
+ curl --request PUT \
+ --url http://localhost:5000/users/5 \
+ --header 'Connection: close' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --header 'Accept: */*' \
+ --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:5000' \
+ --data "{\n \"name\":\"harshjoshi1\"\n}"
diff --git a/flask_postgresql_app/keploy/test-set-0/tests/test-4.yaml b/flask_postgresql_app/keploy/test-set-0/tests/test-4.yaml
new file mode 100755
index 0000000..36650b5
--- /dev/null
+++ b/flask_postgresql_app/keploy/test-set-0/tests/test-4.yaml
@@ -0,0 +1,53 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-4
+spec:
+ metadata: {}
+ req:
+ method: DELETE
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/users/5
+ header:
+ Accept: '*/*'
+ Accept-Encoding: gzip, deflate, br
+ Connection: close
+ Content-Length: "26"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: Thunder Client (https://www.thunderclient.com)
+ body: |-
+ {
+ "name":"harshjoshi1"
+ }
+ timestamp: 2024-10-09T16:52:29.147040179Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "35"
+ Content-Type: application/json
+ Date: Wed, 09 Oct 2024 16:52:29 GMT
+ Server: Werkzeug/2.0.1 Python/3.9.20
+ body: |
+ {
+ "message": "User 5 deleted."
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-09T16:52:31.185249908Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1728492751
+curl: |-
+ curl --request DELETE \
+ --url http://localhost:5000/users/5 \
+ --header 'Host: localhost:5000' \
+ --header 'Connection: close' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --header 'Accept: */*' \
+ --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \
+ --header 'Content-Type: application/json' \
+ --data "{\n \"name\":\"harshjoshi1\"\n}"
diff --git a/flask_postgresql_app/keploy/test-set-0/tests/test-5.yaml b/flask_postgresql_app/keploy/test-set-0/tests/test-5.yaml
new file mode 100755
index 0000000..97dab2a
--- /dev/null
+++ b/flask_postgresql_app/keploy/test-set-0/tests/test-5.yaml
@@ -0,0 +1,50 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-5
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/users
+ header:
+ Accept: '*/*'
+ Accept-Encoding: gzip, deflate, br
+ Connection: close
+ Content-Length: "26"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: Thunder Client (https://www.thunderclient.com)
+ body: |-
+ {
+ "name":"harshjoshi1"
+ }
+ timestamp: 2024-10-09T16:52:34.318334127Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "46"
+ Content-Type: application/json
+ Date: Wed, 09 Oct 2024 16:52:34 GMT
+ Server: Werkzeug/2.0.1 Python/3.9.20
+ body: "[\n {\n \"id\": 4, \n \"name\": \"harsh\"\n }\n]\n"
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-09T16:52:36.413011311Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1728492756
+curl: |-
+ curl --request GET \
+ --url http://localhost:5000/users \
+ --header 'Accept: */*' \
+ --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:5000' \
+ --header 'Connection: close' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --data "{\n \"name\":\"harshjoshi1\"\n}"
diff --git a/flask_postgresql_app/keploy/test-set-0/tests/test-6.yaml b/flask_postgresql_app/keploy/test-set-0/tests/test-6.yaml
new file mode 100755
index 0000000..649f206
--- /dev/null
+++ b/flask_postgresql_app/keploy/test-set-0/tests/test-6.yaml
@@ -0,0 +1,53 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-6
+spec:
+ metadata: {}
+ req:
+ method: DELETE
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/users/4
+ header:
+ Accept: '*/*'
+ Accept-Encoding: gzip, deflate, br
+ Connection: close
+ Content-Length: "26"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: Thunder Client (https://www.thunderclient.com)
+ body: |-
+ {
+ "name":"harshjoshi1"
+ }
+ timestamp: 2024-10-09T16:52:49.27966925Z
+ resp:
+ status_code: 200
+ header:
+ Content-Length: "35"
+ Content-Type: application/json
+ Date: Wed, 09 Oct 2024 16:52:49 GMT
+ Server: Werkzeug/2.0.1 Python/3.9.20
+ body: |
+ {
+ "message": "User 4 deleted."
+ }
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-09T16:52:51.378732252Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1728492771
+curl: |-
+ curl --request DELETE \
+ --url http://localhost:5000/users/4 \
+ --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:5000' \
+ --header 'Connection: close' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --header 'Accept: */*' \
+ --data "{\n \"name\":\"harshjoshi1\"\n}"
diff --git a/flask_postgresql_app/keploy/test-set-0/tests/test-7.yaml b/flask_postgresql_app/keploy/test-set-0/tests/test-7.yaml
new file mode 100755
index 0000000..3aa1e77
--- /dev/null
+++ b/flask_postgresql_app/keploy/test-set-0/tests/test-7.yaml
@@ -0,0 +1,54 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-7
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:5000/users/
+ header:
+ Accept: '*/*'
+ Accept-Encoding: gzip, deflate, br
+ Connection: close
+ Content-Length: "26"
+ Content-Type: application/json
+ Host: localhost:5000
+ User-Agent: Thunder Client (https://www.thunderclient.com)
+ body: |-
+ {
+ "name":"harshjoshi1"
+ }
+ timestamp: 2024-10-09T16:52:53.793701467Z
+ resp:
+ status_code: 404
+ header:
+ Content-Length: "232"
+ Content-Type: text/html; charset=utf-8
+ Date: Wed, 09 Oct 2024 16:52:53 GMT
+ Server: Werkzeug/2.0.1 Python/3.9.20
+ body: |
+
+ 404 Not Found
+ Not Found
+ The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
+ status_message: Not Found
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-10-09T16:52:55.800973357Z
+ objects: []
+ assertions:
+ noise:
+ header.Date: []
+ created: 1728492775
+curl: |-
+ curl --request GET \
+ --url http://localhost:5000/users/ \
+ --header 'Host: localhost:5000' \
+ --header 'Connection: close' \
+ --header 'Accept-Encoding: gzip, deflate, br' \
+ --header 'Accept: */*' \
+ --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \
+ --header 'Content-Type: application/json' \
+ --data "{\n \"name\":\"harshjoshi1\"\n}"
diff --git a/flask_postgresql_app/requirements.txt b/flask_postgresql_app/requirements.txt
new file mode 100644
index 0000000..d6ff7bb
--- /dev/null
+++ b/flask_postgresql_app/requirements.txt
@@ -0,0 +1,6 @@
+Flask==2.3.3
+Flask-SQLAlchemy==3.0.5
+psycopg2-binary==2.9.10
+Werkzeug==3.0.5
+SQLAlchemy==2.0.36
+python-dotenv
diff --git a/sanic-mongo/README.md b/sanic-mongo/README.md
new file mode 100644
index 0000000..f0cc267
--- /dev/null
+++ b/sanic-mongo/README.md
@@ -0,0 +1,122 @@
+This application is a simple movie management API built using Python's Sanic framework and MongoDB for data storage. It allows you to perform basic CRUD (Create, Read, Update, Delete) operations on Movie records.
+
+## Table of Contents
+
+# Introduction
+
+🪄 Dive into the world of Movie CRUD Apps and see how seamlessly Keploy integrated with [Sanic](hhttps://sanic.dev/en/) and [MongoDB](https://www.mongodb.com/). Buckle up, it's gonna be a fun ride! 🎢
+
+## Pre-Requisite 🛠️
+
+- Install WSL (`wsl --install`) for Windows.
+
+## Optional 🛠️
+
+- Install Colima( `brew install colima && colima start` ) for MacOs.
+
+## Installation 📥
+
+Depending on your OS, choose your adventure:
+
+Alright, let's equip ourselves with the **latest Keploy binary**:
+
+```bash
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
+
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
+```
+
+#### Add alias for Keploy:
+
+```bash
+alias keploy='sudo docker run --pull always --name keploy-v2 -p 16789:16789 --privileged --pid=host -it -v "$(pwd)":/files -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock -v '"$HOME"'/.keploy-config:/root/.keploy-config -v '"$HOME"'/.keploy:/root/.keploy --rm ghcr.io/keploy/keploy'
+```
+
+Now head to the folder of the application and run
+
+```
+pip3 install -r requirements.txt
+```
+
+### Lights, Camera, Record! 🎥
+
+Capture the test-cases-
+
+```shell
+keploy record -c "python3 server.py"
+```
+
+🔥**Make some API calls**. Postman, Hoppscotch or even curl - take your pick!
+
+Let's make URLs short and sweet:
+
+### Generate testcases
+
+To generate testcases we just need to **make some API calls.**
+
+**1. Make a POST requests**
+
+```bash
+ curl -X "POST" "http://127.0.0.1:8000/add_movie" \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json; charset=utf-8' \
+ -d '{
+ "name": "Whiplash"
+ }'
+```
+
+```bash
+ curl -X "POST" "http://127.0.0.1:8000/add_movie" \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json; charset=utf-8' \
+ -d '{
+ "name": "Chappie"
+ }'
+```
+
+```bash
+ curl -X "POST" "http://127.0.0.1:8000/add_movie" \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json; charset=utf-8' \
+ -d '{
+ "name": "Titanic"
+ }'
+```
+
+**2. Make a GET request**
+
+In order to see all the movies added to the database, run:
+
+```
+curl -X "GET" "http://127.0.0.1:8000/movies" \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json; charset=utf-8'
+```
+
+**3. Make a DELETE request**
+
+In order to delete all the movies, run:
+
+```bash
+ curl -X "DELETE" "http://127.0.0.1:8000/movies" \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json; charset=utf-8'
+```
+
+You will now see a folder named `keploy` with your recorded tests.
+
+#### Run Tests
+
+Time to put things to the test 🧪
+
+```shell
+keploy test -c "python server.py"
+```
+
+## Wrapping it up 🎉
+
+Congrats on the journey so far! You've seen Keploy's power, flexed your coding muscles, and had a bit of fun too! Now, go out there and keep exploring, innovating, and creating! Remember, with the right tools and a sprinkle of fun, anything's possible.😊🚀
+
+Happy coding! ✨👩💻👨💻✨
+
+
diff --git a/sanic-mongo/keploy/test-set-0/mocks.yaml b/sanic-mongo/keploy/test-set-0/mocks.yaml
new file mode 100644
index 0000000..55e5e0a
--- /dev/null
+++ b/sanic-mongo/keploy/test-set-0/mocks.yaml
@@ -0,0 +1,490 @@
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-0
+spec:
+ metadata:
+ operation: '{ OpQuery flags: [], fullCollectionName: admin.$cmd, numberToSkip: 0, numberToReturn: -1, query: {"ismaster": {"$numberInt":"1"},"helloOk": true,"client": {"driver": {"name": "PyMongo|Motor","version": "4.6.3|3.4.0"},"os": {"type": "Linux","name": "Linux","architecture": "x86_64","version": "5.15.146.1-microsoft-standard-WSL2"},"platform": "CPython 3.10.12.final.0|asyncio"}}, returnFieldsSelector: }'
+ type: config
+ requests:
+ - header:
+ length: 303
+ requestId: 1804289383
+ responseTo: 0
+ Opcode: 2004
+ message:
+ flags: 0
+ collection_name: admin.$cmd
+ number_to_skip: 0
+ number_to_return: -1
+ query: '{"ismaster":{"$numberInt":"1"},"helloOk":true,"client":{"driver":{"name":"PyMongo|Motor","version":"4.6.3|3.4.0"},"os":{"type":"Linux","name":"Linux","architecture":"x86_64","version":"5.15.146.1-microsoft-standard-WSL2"},"platform":"CPython 3.10.12.final.0|asyncio"}}'
+ return_fields_selector: ""
+ responses:
+ - header:
+ length: 329
+ requestId: 13
+ responseTo: 1804289383
+ Opcode: 1
+ message:
+ response_flags: 8
+ cursor_id: 0
+ starting_from: 0
+ number_returned: 1
+ documents:
+ - '{"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"667b1d2066b0c1d16885b016"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1719344783026"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"4"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"21"},"readOnly":false,"ok":{"$numberDouble":"1.0"}}'
+ read_delay: 560917
+ created: 1719344783
+ reqTimestampMock: 2024-06-26T01:16:23.025984506+05:30
+ resTimestampMock: 2024-06-26T01:16:23.026710262+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-1
+spec:
+ metadata:
+ operation: '{ OpQuery flags: [], fullCollectionName: admin.$cmd, numberToSkip: 0, numberToReturn: -1, query: {"ismaster": {"$numberInt":"1"},"helloOk": true,"client": {"driver": {"name": "PyMongo|Motor","version": "4.6.3|3.4.0"},"os": {"type": "Linux","name": "Linux","architecture": "x86_64","version": "5.15.146.1-microsoft-standard-WSL2"},"platform": "CPython 3.10.12.final.0|asyncio"},"compression": []}, returnFieldsSelector: }'
+ type: config
+ requests:
+ - header:
+ length: 321
+ requestId: 1714636915
+ responseTo: 0
+ Opcode: 2004
+ message:
+ flags: 0
+ collection_name: admin.$cmd
+ number_to_skip: 0
+ number_to_return: -1
+ query: '{"ismaster":{"$numberInt":"1"},"helloOk":true,"client":{"driver":{"name":"PyMongo|Motor","version":"4.6.3|3.4.0"},"os":{"type":"Linux","name":"Linux","architecture":"x86_64","version":"5.15.146.1-microsoft-standard-WSL2"},"platform":"CPython 3.10.12.final.0|asyncio"},"compression":[]}'
+ return_fields_selector: ""
+ responses:
+ - header:
+ length: 329
+ requestId: 15
+ responseTo: 1714636915
+ Opcode: 1
+ message:
+ response_flags: 8
+ cursor_id: 0
+ starting_from: 0
+ number_returned: 1
+ documents:
+ - '{"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"667b1d2066b0c1d16885b016"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1719344783030"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"6"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"21"},"readOnly":false,"ok":{"$numberDouble":"1.0"}}'
+ read_delay: 657515
+ created: 1719344783
+ reqTimestampMock: 2024-06-26T01:16:23.030363133+05:30
+ resTimestampMock: 2024-06-26T01:16:23.031173194+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-2
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"insert":"movies","ordered":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }, { SectionSingle identifier: documents , msgs: [ {"_id":"667b1e8fd71cb97567de07c5","name":"Whiplash"} ] }], checksum: 0 }'
+ requests:
+ - header:
+ length: 179
+ requestId: 1957747793
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"insert":"movies","ordered":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }'
+ - '{ SectionSingle identifier: documents , msgs: [ {"_id":"667b1e8fd71cb97567de07c5","name":"Whiplash"} ] }'
+ checksum: 0
+ read_delay: 542094
+ responses:
+ - header:
+ length: 45
+ requestId: 16
+ responseTo: 1957747793
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"n":{"$numberInt":"1"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 551413
+ created: 1719344783
+ reqTimestampMock: 2024-06-26T01:16:23.031860881+05:30
+ resTimestampMock: 2024-06-26T01:16:23.032549882+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-3
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"movies","filter":{"_id":"667b1e8fd71cb97567de07c5"},"limit":{"$numberInt":"1"},"singleBatch":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 166
+ requestId: 424238335
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"movies","filter":{"_id":"667b1e8fd71cb97567de07c5"},"limit":{"$numberInt":"1"},"singleBatch":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }'
+ checksum: 0
+ read_delay: 1402363
+ responses:
+ - header:
+ length: 162
+ requestId: 17
+ responseTo: 424238335
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"_id":"667b1e8fd71cb97567de07c5","name":"Whiplash"}],"id":{"$numberLong":"0"},"ns":"myapp.movies"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 778841
+ created: 1719344783
+ reqTimestampMock: 2024-06-26T01:16:23.034169772+05:30
+ resTimestampMock: 2024-06-26T01:16:23.035109665+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-4
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"insert":"movies","ordered":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }, { SectionSingle identifier: documents , msgs: [ {"_id":"667b1e95d71cb97567de07c6","name":"Chappie"} ] }], checksum: 0 }'
+ requests:
+ - header:
+ length: 178
+ requestId: 719885386
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"insert":"movies","ordered":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }'
+ - '{ SectionSingle identifier: documents , msgs: [ {"_id":"667b1e95d71cb97567de07c6","name":"Chappie"} ] }'
+ checksum: 0
+ read_delay: 6203095487
+ responses:
+ - header:
+ length: 45
+ requestId: 18
+ responseTo: 719885386
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"n":{"$numberInt":"1"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 745693
+ created: 1719344789
+ reqTimestampMock: 2024-06-26T01:16:29.238351946+05:30
+ resTimestampMock: 2024-06-26T01:16:29.239303785+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-5
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"movies","filter":{"_id":"667b1e95d71cb97567de07c6"},"limit":{"$numberInt":"1"},"singleBatch":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 166
+ requestId: 1649760492
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"movies","filter":{"_id":"667b1e95d71cb97567de07c6"},"limit":{"$numberInt":"1"},"singleBatch":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }'
+ checksum: 0
+ read_delay: 2447949
+ responses:
+ - header:
+ length: 161
+ requestId: 19
+ responseTo: 1649760492
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"_id":"667b1e95d71cb97567de07c6","name":"Chappie"}],"id":{"$numberLong":"0"},"ns":"myapp.movies"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 630241
+ created: 1719344789
+ reqTimestampMock: 2024-06-26T01:16:29.241914889+05:30
+ resTimestampMock: 2024-06-26T01:16:29.242682647+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-6
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 65536, sections: [{ SectionSingle msg: {"hello":{"$numberInt":"1"},"topologyVersion":{"processId":{"$oid":"667b1d2066b0c1d16885b016"},"counter":{"$numberLong":"0"}},"maxAwaitTimeMS":{"$numberInt":"10000"},"$db":"admin"} }], checksum: 0 }'
+ type: config
+ requests:
+ - header:
+ length: 134
+ requestId: 846930886
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 65536
+ sections:
+ - '{ SectionSingle msg: {"hello":{"$numberInt":"1"},"topologyVersion":{"processId":{"$oid":"667b1d2066b0c1d16885b016"},"counter":{"$numberLong":"0"}},"maxAwaitTimeMS":{"$numberInt":"10000"},"$db":"admin"} }'
+ checksum: 0
+ read_delay: 2161277
+ responses:
+ - header:
+ length: 313
+ requestId: 20
+ responseTo: 846930886
+ Opcode: 2013
+ message:
+ flagBits: 2
+ sections:
+ - '{ SectionSingle msg: {"isWritablePrimary":true,"topologyVersion":{"processId":{"$oid":"667b1d2066b0c1d16885b016"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1719344793039"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"4"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"21"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 10010918319
+ created: 1719344793
+ reqTimestampMock: 2024-06-26T01:16:23.029068649+05:30
+ resTimestampMock: 2024-06-26T01:16:33.040142118+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-7
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"hello":{"$numberInt":"1"},"$db":"admin"} }], checksum: 0 }'
+ type: config
+ requests:
+ - header:
+ length: 52
+ requestId: 596516649
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"hello":{"$numberInt":"1"},"$db":"admin"} }'
+ checksum: 0
+ read_delay: 10012578387
+ responses:
+ - header:
+ length: 313
+ requestId: 21
+ responseTo: 596516649
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"isWritablePrimary":true,"topologyVersion":{"processId":{"$oid":"667b1d2066b0c1d16885b016"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1719344793043"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"5"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"21"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 455336
+ created: 1719344793
+ reqTimestampMock: 2024-06-26T01:16:33.043665579+05:30
+ resTimestampMock: 2024-06-26T01:16:33.044280965+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-8
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"insert":"movies","ordered":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }, { SectionSingle identifier: documents , msgs: [ {"_id":"667b1e9bd71cb97567de07c7","name":"Titanic"} ] }], checksum: 0 }'
+ requests:
+ - header:
+ length: 178
+ requestId: 1189641421
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"insert":"movies","ordered":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }'
+ - '{ SectionSingle identifier: documents , msgs: [ {"_id":"667b1e9bd71cb97567de07c7","name":"Titanic"} ] }'
+ checksum: 0
+ read_delay: 6649200875
+ responses:
+ - header:
+ length: 45
+ requestId: 22
+ responseTo: 1189641421
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"n":{"$numberInt":"1"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 561569
+ created: 1719344795
+ reqTimestampMock: 2024-06-26T01:16:35.892029796+05:30
+ resTimestampMock: 2024-06-26T01:16:35.892711+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-9
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"movies","filter":{"_id":"667b1e9bd71cb97567de07c7"},"limit":{"$numberInt":"1"},"singleBatch":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 166
+ requestId: 1025202362
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"movies","filter":{"_id":"667b1e9bd71cb97567de07c7"},"limit":{"$numberInt":"1"},"singleBatch":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }'
+ checksum: 0
+ read_delay: 1988209
+ responses:
+ - header:
+ length: 161
+ requestId: 23
+ responseTo: 1025202362
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"_id":"667b1e9bd71cb97567de07c7","name":"Titanic"}],"id":{"$numberLong":"0"},"ns":"myapp.movies"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 502216
+ created: 1719344795
+ reqTimestampMock: 2024-06-26T01:16:35.894867685+05:30
+ resTimestampMock: 2024-06-26T01:16:35.895517417+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-10
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"find":"movies","filter":{},"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 107
+ requestId: 1350490027
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"find":"movies","filter":{},"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }'
+ checksum: 0
+ read_delay: 6177066246
+ responses:
+ - header:
+ length: 343
+ requestId: 24
+ responseTo: 1350490027
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"cursor":{"firstBatch":[{"_id":"667b1e6d33a7849da6520cea","name":"Whiplash"},{"_id":"667b1e8fd71cb97567de07c5","name":"Whiplash"},{"_id":"667b1e95d71cb97567de07c6","name":"Chappie"},{"_id":"667b1e9bd71cb97567de07c7","name":"Titanic"}],"id":{"$numberLong":"0"},"ns":"myapp.movies"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 1275690
+ created: 1719344802
+ reqTimestampMock: 2024-06-26T01:16:42.072696856+05:30
+ resTimestampMock: 2024-06-26T01:16:42.074091198+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-11
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"ismaster":{"$numberInt":"1"},"helloOk":true,"$db":"admin"} }], checksum: 0 }'
+ type: config
+ requests:
+ - header:
+ length: 65
+ requestId: 783368690
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"ismaster":{"$numberInt":"1"},"helloOk":true,"$db":"admin"} }'
+ checksum: 0
+ read_delay: 10012605933
+ responses:
+ - header:
+ length: 314
+ requestId: 26
+ responseTo: 783368690
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"helloOk":true,"ismaster":true,"topologyVersion":{"processId":{"$oid":"667b1d2066b0c1d16885b016"},"counter":{"$numberLong":"0"}},"maxBsonObjectSize":{"$numberInt":"16777216"},"maxMessageSizeBytes":{"$numberInt":"48000000"},"maxWriteBatchSize":{"$numberInt":"100000"},"localTime":{"$date":{"$numberLong":"1719344803057"}},"logicalSessionTimeoutMinutes":{"$numberInt":"30"},"connectionId":{"$numberInt":"5"},"minWireVersion":{"$numberInt":"0"},"maxWireVersion":{"$numberInt":"21"},"readOnly":false,"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 522723
+ created: 1719344803
+ reqTimestampMock: 2024-06-26T01:16:43.057053931+05:30
+ resTimestampMock: 2024-06-26T01:16:43.057762251+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-12
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"delete":"movies","ordered":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }, { SectionSingle identifier: deletes , msgs: [ {"q":{},"limit":{"$numberInt":"0"}} ] }], checksum: 0 }'
+ requests:
+ - header:
+ length: 143
+ requestId: 1102520059
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"delete":"movies","ordered":true,"lsid":{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}},"$db":"myapp"} }'
+ - '{ SectionSingle identifier: deletes , msgs: [ {"q":{},"limit":{"$numberInt":"0"}} ] }'
+ checksum: 0
+ read_delay: 9127441948
+ responses:
+ - header:
+ length: 45
+ requestId: 27
+ responseTo: 1102520059
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"n":{"$numberInt":"4"},"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 761264
+ created: 1719344811
+ reqTimestampMock: 2024-06-26T01:16:51.201703124+05:30
+ resTimestampMock: 2024-06-26T01:16:51.20258821+05:30
+---
+version: api.keploy.io/v1beta1
+kind: Mongo
+name: mock-13
+spec:
+ metadata:
+ operation: '{ OpMsg flags: 0, sections: [{ SectionSingle msg: {"endSessions":[{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}}],"$db":"admin"} }], checksum: 0 }'
+ requests:
+ - header:
+ length: 92
+ requestId: 1967513926
+ responseTo: 0
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"endSessions":[{"id":{"$binary":{"base64":"Mx+ps9bVQSSsAdH3K5VdCg==","subType":"04"}}}],"$db":"admin"} }'
+ checksum: 0
+ read_delay: 8507808445
+ responses:
+ - header:
+ length: 38
+ requestId: 30
+ responseTo: 1967513926
+ Opcode: 2013
+ message:
+ flagBits: 0
+ sections:
+ - '{ SectionSingle msg: {"ok":{"$numberDouble":"1.0"}} }'
+ checksum: 0
+ read_delay: 382255
+ created: 1719344819
+ reqTimestampMock: 2024-06-26T01:16:59.710542397+05:30
+ resTimestampMock: 2024-06-26T01:16:59.711041681+05:30
diff --git a/sanic-mongo/keploy/test-set-0/tests/test-1.yaml b/sanic-mongo/keploy/test-set-0/tests/test-1.yaml
new file mode 100644
index 0000000..320cd9b
--- /dev/null
+++ b/sanic-mongo/keploy/test-set-0/tests/test-1.yaml
@@ -0,0 +1,42 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/add_movie
+ header:
+ Accept: application/json
+ Content-Length: "20"
+ Content-Type: application/json; charset=utf-8
+ Host: 127.0.0.1:8000
+ User-Agent: curl/7.81.0
+ body: '{"name": "Whiplash"}'
+ timestamp: 2024-06-26T01:16:23.022752322+05:30
+ resp:
+ status_code: 200
+ header:
+ Alt-Svc: ""
+ Connection: keep-alive
+ Content-Length: "52"
+ Content-Type: application/json
+ body: '{"_id":"667b1e8fd71cb97567de07c5","name":"Whiplash"}'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-06-26T01:16:25.086349854+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1719344785
+curl: |-
+ curl --request POST \
+ --url http://127.0.0.1:8000/add_movie \
+ --header 'Host: 127.0.0.1:8000' \
+ --header 'User-Agent: curl/7.81.0' \
+ --header 'Accept: application/json' \
+ --header 'Content-Type: application/json; charset=utf-8' \
+ --data '{"name": "Whiplash"}'
diff --git a/sanic-mongo/keploy/test-set-0/tests/test-2.yaml b/sanic-mongo/keploy/test-set-0/tests/test-2.yaml
new file mode 100644
index 0000000..719b20c
--- /dev/null
+++ b/sanic-mongo/keploy/test-set-0/tests/test-2.yaml
@@ -0,0 +1,42 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-2
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/add_movie
+ header:
+ Accept: application/json
+ Content-Length: "19"
+ Content-Type: application/json; charset=utf-8
+ Host: 127.0.0.1:8000
+ User-Agent: curl/7.81.0
+ body: '{"name": "Chappie"}'
+ timestamp: 2024-06-26T01:16:29.236765225+05:30
+ resp:
+ status_code: 200
+ header:
+ Alt-Svc: ""
+ Connection: keep-alive
+ Content-Length: "51"
+ Content-Type: application/json
+ body: '{"_id":"667b1e95d71cb97567de07c6","name":"Chappie"}'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-06-26T01:16:31.312393895+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1719344791
+curl: |-
+ curl --request POST \
+ --url http://127.0.0.1:8000/add_movie \
+ --header 'Host: 127.0.0.1:8000' \
+ --header 'User-Agent: curl/7.81.0' \
+ --header 'Accept: application/json' \
+ --header 'Content-Type: application/json; charset=utf-8' \
+ --data '{"name": "Chappie"}'
diff --git a/sanic-mongo/keploy/test-set-0/tests/test-3.yaml b/sanic-mongo/keploy/test-set-0/tests/test-3.yaml
new file mode 100644
index 0000000..9948d84
--- /dev/null
+++ b/sanic-mongo/keploy/test-set-0/tests/test-3.yaml
@@ -0,0 +1,42 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-3
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/add_movie
+ header:
+ Accept: application/json
+ Content-Length: "19"
+ Content-Type: application/json; charset=utf-8
+ Host: 127.0.0.1:8000
+ User-Agent: curl/7.81.0
+ body: '{"name": "Titanic"}'
+ timestamp: 2024-06-26T01:16:35.890538161+05:30
+ resp:
+ status_code: 200
+ header:
+ Alt-Svc: ""
+ Connection: keep-alive
+ Content-Length: "51"
+ Content-Type: application/json
+ body: '{"_id":"667b1e9bd71cb97567de07c7","name":"Titanic"}'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-06-26T01:16:37.940966466+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1719344797
+curl: |-
+ curl --request POST \
+ --url http://127.0.0.1:8000/add_movie \
+ --header 'Accept: application/json' \
+ --header 'Content-Type: application/json; charset=utf-8' \
+ --header 'Host: 127.0.0.1:8000' \
+ --header 'User-Agent: curl/7.81.0' \
+ --data '{"name": "Titanic"}'
diff --git a/sanic-mongo/keploy/test-set-0/tests/test-4.yaml b/sanic-mongo/keploy/test-set-0/tests/test-4.yaml
new file mode 100644
index 0000000..f69d270
--- /dev/null
+++ b/sanic-mongo/keploy/test-set-0/tests/test-4.yaml
@@ -0,0 +1,40 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-4
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/movies
+ header:
+ Accept: application/json
+ Content-Type: application/json; charset=utf-8
+ Host: 127.0.0.1:8000
+ User-Agent: curl/7.81.0
+ body: ""
+ timestamp: 2024-06-26T01:16:42.071382334+05:30
+ resp:
+ status_code: 200
+ header:
+ Alt-Svc: ""
+ Connection: keep-alive
+ Content-Length: "211"
+ Content-Type: application/json
+ body: '[{"_id":"667b1e6d33a7849da6520cea","name":"Whiplash"},{"_id":"667b1e8fd71cb97567de07c5","name":"Whiplash"},{"_id":"667b1e95d71cb97567de07c6","name":"Chappie"},{"_id":"667b1e9bd71cb97567de07c7","name":"Titanic"}]'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-06-26T01:16:44.167252247+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1719344804
+curl: |
+ curl --request GET \
+ --url http://127.0.0.1:8000/movies \
+ --header 'Host: 127.0.0.1:8000' \
+ --header 'User-Agent: curl/7.81.0' \
+ --header 'Accept: application/json' \
+ --header 'Content-Type: application/json; charset=utf-8' \
diff --git a/sanic-mongo/keploy/test-set-0/tests/test-5.yaml b/sanic-mongo/keploy/test-set-0/tests/test-5.yaml
new file mode 100644
index 0000000..198d464
--- /dev/null
+++ b/sanic-mongo/keploy/test-set-0/tests/test-5.yaml
@@ -0,0 +1,38 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-5
+spec:
+ metadata: {}
+ req:
+ method: DELETE
+ proto_major: 1
+ proto_minor: 1
+ url: http://127.0.0.1:8000/movies
+ header:
+ Accept: application/json
+ Content-Type: application/json; charset=utf-8
+ Host: 127.0.0.1:8000
+ User-Agent: curl/7.81.0
+ body: ""
+ timestamp: 2024-06-26T01:16:51.200010582+05:30
+ resp:
+ status_code: 204
+ header:
+ Alt-Svc: ""
+ Connection: keep-alive
+ body: ""
+ status_message: No Content
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-06-26T01:16:53.208616296+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1719344813
+curl: |
+ curl --request DELETE \
+ --url http://127.0.0.1:8000/movies \
+ --header 'Content-Type: application/json; charset=utf-8' \
+ --header 'Host: 127.0.0.1:8000' \
+ --header 'User-Agent: curl/7.81.0' \
+ --header 'Accept: application/json' \
diff --git a/sanic-mongo/requirements.txt b/sanic-mongo/requirements.txt
new file mode 100644
index 0000000..04a5484
--- /dev/null
+++ b/sanic-mongo/requirements.txt
@@ -0,0 +1,3 @@
+pymongo==4.6.3
+sanic==23.12.1
+sanic_motor==0.7.0
\ No newline at end of file
diff --git a/sanic-mongo/server.py b/sanic-mongo/server.py
new file mode 100644
index 0000000..c05998d
--- /dev/null
+++ b/sanic-mongo/server.py
@@ -0,0 +1,60 @@
+from sanic import Sanic, text
+from sanic.response import json as json_response
+from sanic.exceptions import NotFound
+from sanic_motor import BaseModel
+from bson import ObjectId
+
+app = Sanic(__name__)
+
+settings = dict(
+ MOTOR_URI='mongodb://localhost:27017/myapp', LOGO=None
+)
+
+app.config.update(settings)
+
+BaseModel.init_app(app)
+
+class Movie(BaseModel):
+ __coll__ = "movies"
+
+@app.route("/add_movie", methods=["POST"])
+async def add_movie(request):
+ movie = request.json
+ movie["_id"] = str(ObjectId())
+
+ new_movie = await Movie.insert_one(movie)
+ created_movie = await Movie.find_one({"_id": new_movie.inserted_id}, as_raw=True)
+ return json_response(created_movie)
+
+
+@app.route("/movies", methods=["GET"])
+async def list_movies(request):
+ movies = await Movie.find(as_raw=True)
+ return json_response(movies.objects)
+
+
+
+@app.route("/movies/", methods=["GET"])
+async def get_movie(request, id):
+ if (movies := await Movie.find_one({"_id": id}, as_raw=True)) is not None:
+ return json_response(movies)
+
+ raise NotFound(f"Movie {id} not found")
+
+
+@app.route("/movies/", methods=["DELETE"])
+async def delete_movie(request, id):
+ delete_result = await Movie.delete_one({"_id": id})
+
+ if delete_result.deleted_count == 1:
+ return json_response({}, status=204)
+
+ raise NotFound(f"Movie {id} not found")
+
+@app.route("/movies", methods=["DELETE"])
+async def delete_all_movies(request):
+ await Movie.delete_many({})
+ return json_response({}, status=204)
+
+if __name__ == "__main__":
+ app.run(host="127.0.0.1", port=8000, debug=True)
\ No newline at end of file
diff --git a/sanic-postgres/.env b/sanic-postgres/.env
new file mode 100644
index 0000000..151c5cd
--- /dev/null
+++ b/sanic-postgres/.env
@@ -0,0 +1,2 @@
+FLASK_ENV=development
+DATABASE_URL=postgresql://myuser:mypassword@localhost:5432/mydatabase
diff --git a/sanic-postgres/.gitignore b/sanic-postgres/.gitignore
new file mode 100644
index 0000000..43513b1
--- /dev/null
+++ b/sanic-postgres/.gitignore
@@ -0,0 +1 @@
+myenv/
\ No newline at end of file
diff --git a/sanic-postgres/README.md b/sanic-postgres/README.md
new file mode 100644
index 0000000..391b4c4
--- /dev/null
+++ b/sanic-postgres/README.md
@@ -0,0 +1,127 @@
+# Employee Management API
+
+This application is a simple employee management API built using Python's Sanic framework and PostgreSQL for data storage. It allows you to perform basic CRUD (Create, Read, Update, Delete) operations on employee records.
+
+## Table of Contents
+
+- [Introduction](#introduction)
+- [Pre-Requisites](#pre-requisites)
+- [Installation](#installation)
+- [API Endpoints](#api-endpoints)
+ - [Create Employee](#create-employee)
+ - [Get All Employees](#get-all-employees)
+ - [Get Employee by ID](#get-employee-by-id)
+ - [Update Employee](#update-employee)
+ - [Delete Employee](#delete-employee)
+- [Testing](#testing)
+- [Wrapping it up](#wrapping-it-up)
+
+## Introduction
+
+🪄 Dive into the world of Employee Management and see how seamlessly Keploy integrated with Sanic and PostgreSQL. Buckle up, it's gonna be a fun ride! 🎢
+
+## Pre-Requisites 🛠️
+
+Before you begin, ensure you have the following installed:
+
+- **Python 3.x**: The programming language used for this application. You can download it from [python.org](https://www.python.org/downloads/).
+- **PostgreSQL**: The database system used for storing employee data. You can download it from [postgresql.org](https://www.postgresql.org/download/).
+
+## Installation 📥
+
+Once you have the prerequisites set up, follow these steps:
+
+1. Clone the repository:
+
+ ```bash
+ git clone https://github.com/keploy/sample-python.git
+ cd sample-python
+Install the required Python packages:
+
+```bash
+pip install -r requirements.txt
+```
+
+Set up your PostgreSQL database and update the connection settings in your application as needed.
+
+Install the latest Keploy binary:
+
+```bash
+curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
+sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
+```
+Add alias for Keploy:
+
+```bash
+alias keploy='sudo docker run --pull always --name keploy-v2 -p 16789:16789 --privileged --pid=host -it -v "$(pwd)":/files -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock -v '"$HOME"'/.keploy-config:/root/.keploy-config -v '"$HOME"'/.keploy:/root/.keploy --rm ghcr.io/keploy/keploy'
+```
+Install the dependencies:
+
+```bash
+pip3 install -r requirements.txt
+```
+API Endpoints
+Create Employee
+To add a new employee:
+
+```bash
+curl -X POST http://localhost:8000/employees \
+-H "Content-Type: application/json" \
+-d '{
+ "first_name": "John",
+ "last_name": "Doe",
+ "email": "john.doe@example.com",
+ "position": "Developer",
+ "salary": 60000
+}'
+```
+Get All Employees
+To retrieve all employees:
+
+```bash
+curl -X GET http://localhost:8000/employees
+```
+
+Get Employee by ID
+To retrieve a specific employee by ID:
+
+```bash
+curl -X GET http://localhost:8000/employees/1
+```
+Update Employee
+To update an existing employee's details:
+
+```bash
+curl -X PUT http://localhost:8000/employees/1 \
+-H "Content-Type: application/json" \
+-d '{
+ "first_name": "Jane",
+ "last_name": "Doe",
+ "email": "jane.doe@example.com",
+ "position": "Senior Developer",
+ "salary": 80000
+}'
+```
+Delete Employee
+To delete an employee:
+
+```bash
+curl -X DELETE http://localhost:8000/employees/1
+```
+Testing
+Capture Test Cases
+Capture the test cases using Keploy:
+
+```bash
+keploy record -c "python3 server.py"
+```
+Run Tests
+Run the tests:
+
+```bash
+keploy test -c "python3 server.py"
+```
+Wrapping it up 🎉
+Congrats on the journey so far! You've seen how to manage employees seamlessly with Keploy, Sanic, and PostgreSQL. Keep exploring, innovating, and creating! With the right tools, anything's possible. 😊🚀
+
+Happy coding! ✨👩💻👨💻✨
\ No newline at end of file
diff --git a/sanic-postgres/keploy.yml b/sanic-postgres/keploy.yml
new file mode 100755
index 0000000..2e0604c
--- /dev/null
+++ b/sanic-postgres/keploy.yml
@@ -0,0 +1,61 @@
+path: ""
+appId: 0
+appName: sanic-postgres
+command: python3 server.py
+templatize:
+ testSets: []
+port: 0
+dnsPort: 26789
+proxyPort: 16789
+debug: false
+disableTele: false
+disableANSI: false
+containerName: ""
+networkName: ""
+buildDelay: 30
+test:
+ selectedTests: {}
+ globalNoise:
+ global: {}
+ test-sets: {}
+ delay: 5
+ host: ""
+ port: 0
+ apiTimeout: 5
+ skipCoverage: false
+ coverageReportPath: ""
+ ignoreOrdering: true
+ mongoPassword: default@123
+ language: ""
+ removeUnusedMocks: false
+ fallBackOnMiss: false
+ jacocoAgentPath: ""
+ basePath: ""
+ mocking: true
+ ignoredTests: {}
+ disableLineCoverage: false
+ disableMockUpload: true
+ useLocalMock: false
+ updateTemplate: false
+record:
+ filters: []
+ recordTimer: 0s
+configPath: ""
+bypassRules: []
+generateGithubActions: false
+keployContainer: keploy-v2
+keployNetwork: keploy-network
+cmdType: native
+contract:
+ services: []
+ tests: []
+ path: ""
+ download: false
+ generate: false
+ driven: consumer
+ mappings:
+ servicesMapping: {}
+ self: ""
+inCi: false
+
+# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
diff --git a/sanic-postgres/keploy/.gitignore b/sanic-postgres/keploy/.gitignore
new file mode 100644
index 0000000..5137843
--- /dev/null
+++ b/sanic-postgres/keploy/.gitignore
@@ -0,0 +1,2 @@
+
+/reports/
diff --git a/sanic-postgres/keploy/test-set-0/mocks.yaml b/sanic-postgres/keploy/test-set-0/mocks.yaml
new file mode 100755
index 0000000..f6b10d5
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/mocks.yaml
@@ -0,0 +1,1752 @@
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-0
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.083972836+05:30
+ restimestampmock: 2024-11-02T00:24:00.084164389+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-1
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.167614021+05:30
+ restimestampmock: 2024-11-02T00:24:00.17718867+05:30
+connectionId: "2"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-2
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.165411429+05:30
+ restimestampmock: 2024-11-02T00:24:00.17710596+05:30
+connectionId: "4"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-3
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.177715308+05:30
+ restimestampmock: 2024-11-02T00:24:00.18145664+05:30
+connectionId: "8"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-4
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.168265524+05:30
+ restimestampmock: 2024-11-02T00:24:00.177743076+05:30
+connectionId: "6"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-5
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.177654462+05:30
+ restimestampmock: 2024-11-02T00:24:00.199354838+05:30
+connectionId: "10"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-6
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.177594935+05:30
+ restimestampmock: 2024-11-02T00:24:00.199162814+05:30
+connectionId: "12"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-7
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.198469406+05:30
+ restimestampmock: 2024-11-02T00:24:00.234040088+05:30
+connectionId: "16"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-8
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.177518008+05:30
+ restimestampmock: 2024-11-02T00:24:00.208708798+05:30
+connectionId: "14"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-9
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ length: 8
+ payload: AAAACATSFi8=
+ ssl_request:
+ is_ssl: true
+ auth_type: 0
+ postgresresponses:
+ - payload: Tg==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.19854718+05:30
+ restimestampmock: 2024-11-02T00:24:00.223360105+05:30
+connectionId: "18"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-10
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAQQADAABjbGllbnRfZW5jb2RpbmcAJ3V0Zi04JwB1c2VyAG15dXNlcgBkYXRhYmFzZQBteWRhdGFiYXNlAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 56033
+ secret_key: 3037226085
+ parameter_status:
+ - name: in_hot_standby
+ value: "off"
+ - name: integer_datetimes
+ value: "on"
+ - name: TimeZone
+ value: Asia/Kolkata
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "off"
+ - name: application_name
+ value: ""
+ - name: default_transaction_read_only
+ value: "off"
+ - name: scram_iterations
+ value: "4096"
+ - name: DateStyle
+ value: ISO, MDY
+ - name: standard_conforming_strings
+ value: "on"
+ - name: session_authorization
+ value: myuser
+ - name: client_encoding
+ value: UTF8
+ - name: server_version
+ value: "16.3"
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.103776338+05:30
+ restimestampmock: 2024-11-02T00:24:00.103914002+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-11
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [P, D]
+ identifier: ClientRequest
+ length: 8
+ payload: UAAAAHxfX2FzeW5jcGdfc3RtdF8xX18ASU5TRVJUIElOVE8gZW1wbG95ZWVzIChmaXJzdF9uYW1lLCBsYXN0X25hbWUsIGVtYWlsLCBwb3NpdGlvbiwgc2FsYXJ5KSBWQUxVRVMgKCQxLCAkMiwgJDMsICQ0LCAkNSkAAABEAAAAGFNfX2FzeW5jcGdfc3RtdF8xX18ASAAAAAQ=
+ describe:
+ object_type: 83
+ name: __asyncpg_stmt_1__
+ parse:
+ - name: __asyncpg_stmt_1__
+ query: INSERT INTO employees (first_name, last_name, email, position, salary) VALUES ($1, $2, $3, $4, $5)
+ parameter_oids: []
+ msg_type: 68
+ auth_type: 0
+ postgresresponses:
+ - header: ["1", t]
+ identifier: ServerResponse
+ length: 8
+ payload: MQAAAAR0AAAAGgAFAAAEEwAABBMAAAQTAAAEEwAABqRuAAAABA==
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ parameter_description:
+ parameteroids:
+ - 1043
+ - 1043
+ - 1043
+ - 1043
+ - 1700
+ msg_type: 116
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:11.553896163+05:30
+ restimestampmock: 2024-11-02T00:24:11.554038629+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-12
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAAHoAX19hc3luY3BnX3N0bXRfMV9fAAAFAAEAAQABAAEAAQAFAAAAA0JvYgAAAAdKb2huc29uAAAAF2JvYi5qb2huc29uQGV4YW1wbGUuY29tAAAAD1Byb2plY3QgTWFuYWdlcgAAAAwAAgABAAAAAAAHE4gAAQABRQAAAAkAAAAAAFMAAAAE
+ bind:
+ - prepared_statement: __asyncpg_stmt_1__
+ parameter_format_codes: [1, 1, 1, 1, 1]
+ parameters: [[66, 111, 98], [74, 111, 104, 110, 115, 111, 110], [98, 111, 98, 46, 106, 111, 104, 110, 115, 111, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [80, 114, 111, 106, 101, 99, 116, 32, 77, 97, 110, 97, 103, 101, 114], [0, 2, 0, 1, 0, 0, 0, 0, 0, 7, 19, 136]]
+ result_format_codes: [1]
+ execute:
+ - {}
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: INSERT 0 1
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:11.580492915+05:30
+ restimestampmock: 2024-11-02T00:24:11.581306226+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-13
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:11.586699965+05:30
+ restimestampmock: 2024-11-02T00:24:11.588399417+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-14
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAAHsAX19hc3luY3BnX3N0bXRfMV9fAAAFAAEAAQABAAEAAQAFAAAAB0NoYXJsaWUAAAAFQnJvd24AAAAZY2hhcmxpZS5icm93bkBleGFtcGxlLmNvbQAAAAxEYXRhIEFuYWx5c3QAAAAMAAIAAQAAAAAABROIAAEAAUUAAAAJAAAAAABTAAAABA==
+ bind:
+ - prepared_statement: __asyncpg_stmt_1__
+ parameter_format_codes: [1, 1, 1, 1, 1]
+ parameters: [[67, 104, 97, 114, 108, 105, 101], [66, 114, 111, 119, 110], [99, 104, 97, 114, 108, 105, 101, 46, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [68, 97, 116, 97, 32, 65, 110, 97, 108, 121, 115, 116], [0, 2, 0, 1, 0, 0, 0, 0, 0, 5, 19, 136]]
+ result_format_codes: [1]
+ execute:
+ - {}
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: INSERT 0 1
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:24.631061378+05:30
+ restimestampmock: 2024-11-02T00:24:24.631153695+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-15
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:24.634474685+05:30
+ restimestampmock: 2024-11-02T00:24:24.634607459+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-16
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAAHgAX19hc3luY3BnX3N0bXRfMV9fAAAFAAEAAQABAAEAAQAFAAAABURpYW5hAAAABlByaW5jZQAAABhkaWFuYS5wcmluY2VAZXhhbXBsZS5jb20AAAALVVggRGVzaWduZXIAAAAMAAIAAQAAAAAABwAAAAEAAUUAAAAJAAAAAABTAAAABA==
+ bind:
+ - prepared_statement: __asyncpg_stmt_1__
+ parameter_format_codes: [1, 1, 1, 1, 1]
+ parameters: [[68, 105, 97, 110, 97], [80, 114, 105, 110, 99, 101], [100, 105, 97, 110, 97, 46, 112, 114, 105, 110, 99, 101, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [85, 88, 32, 68, 101, 115, 105, 103, 110, 101, 114], [0, 2, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0]]
+ result_format_codes: [1]
+ execute:
+ - {}
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: INSERT 0 1
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:34.337791555+05:30
+ restimestampmock: 2024-11-02T00:24:34.337858813+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-17
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:34.341253861+05:30
+ restimestampmock: 2024-11-02T00:24:34.341390263+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-18
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAAH4AX19hc3luY3BnX3N0bXRfMV9fAAAFAAEAAQABAAEAAQAFAAAABUV0aGFuAAAABEh1bnQAAAAWZXRoYW4uaHVudEBleGFtcGxlLmNvbQAAABVOZXR3b3JrIEFkbWluaXN0cmF0b3IAAAAMAAIAAQAAAAAABgAAAAEAAUUAAAAJAAAAAABTAAAABA==
+ bind:
+ - prepared_statement: __asyncpg_stmt_1__
+ parameter_format_codes: [1, 1, 1, 1, 1]
+ parameters: [[69, 116, 104, 97, 110], [72, 117, 110, 116], [101, 116, 104, 97, 110, 46, 104, 117, 110, 116, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [78, 101, 116, 119, 111, 114, 107, 32, 65, 100, 109, 105, 110, 105, 115, 116, 114, 97, 116, 111, 114], [0, 2, 0, 1, 0, 0, 0, 0, 0, 6, 0, 0]]
+ result_format_codes: [1]
+ execute:
+ - {}
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: INSERT 0 1
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:41.07876865+05:30
+ restimestampmock: 2024-11-02T00:24:41.078836668+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-19
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:41.08021433+05:30
+ restimestampmock: 2024-11-02T00:24:41.08029966+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-20
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [P, D]
+ identifier: ClientRequest
+ length: 8
+ payload: UAAAAPZfX2FzeW5jcGdfc3RtdF8yX18ACiAgICAgICAgICAgIFVQREFURSBlbXBsb3llZXMKICAgICAgICAgICAgU0VUIGZpcnN0X25hbWUgPSAkMSwKICAgICAgICAgICAgICAgIGxhc3RfbmFtZSA9ICQyLAogICAgICAgICAgICAgICAgZW1haWwgPSAkMywKICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gJDQsCiAgICAgICAgICAgICAgICBzYWxhcnkgPSAkNQogICAgICAgICAgICBXSEVSRSBpZCA9ICQ2CiAgICAgICAgICAgIAAAAEQAAAAYU19fYXN5bmNwZ19zdG10XzJfXwBIAAAABA==
+ describe:
+ object_type: 83
+ name: __asyncpg_stmt_2__
+ parse:
+ - name: __asyncpg_stmt_2__
+ query: ' UPDATE employees SET first_name = $1, last_name = $2, email = $3, position = $4, salary = $5 WHERE id = $6 '
+ parameter_oids: []
+ msg_type: 68
+ auth_type: 0
+ postgresresponses:
+ - header: ["1", t]
+ identifier: ServerResponse
+ length: 8
+ payload: MQAAAAR0AAAAHgAGAAAEEwAABBMAAAQTAAAEEwAABqQAAAAXbgAAAAQ=
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ parameter_description:
+ parameteroids:
+ - 1043
+ - 1043
+ - 1043
+ - 1043
+ - 1700
+ - 23
+ msg_type: 116
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:25:47.4085832+05:30
+ restimestampmock: 2024-11-02T00:25:47.415893588+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-21
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAAIoAX19hc3luY3BnX3N0bXRfMl9fAAAGAAEAAQABAAEAAQABAAYAAAAFRnJhbmsAAAAGQ2FzdGxlAAAAGGZyYW5rLmNhc3RsZUBleGFtcGxlLmNvbQAAABNTZWN1cml0eSBTcGVjaWFsaXN0AAAADAACAAEAAAAAAAgAAAAAAAQAAAABAAEAAUUAAAAJAAAAAABTAAAABA==
+ bind:
+ - prepared_statement: __asyncpg_stmt_2__
+ parameter_format_codes: [1, 1, 1, 1, 1, 1]
+ parameters: [[70, 114, 97, 110, 107], [67, 97, 115, 116, 108, 101], [102, 114, 97, 110, 107, 46, 99, 97, 115, 116, 108, 101, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [83, 101, 99, 117, 114, 105, 116, 121, 32, 83, 112, 101, 99, 105, 97, 108, 105, 115, 116], [0, 2, 0, 1, 0, 0, 0, 0, 0, 8, 0, 0], [0, 0, 0, 1]]
+ result_format_codes: [1]
+ execute:
+ - {}
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: UPDATE 0
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:25:47.460065945+05:30
+ restimestampmock: 2024-11-02T00:25:47.460193217+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-22
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:25:47.463869372+05:30
+ restimestampmock: 2024-11-02T00:25:47.463997714+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-23
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [P, D]
+ identifier: ClientRequest
+ length: 8
+ payload: UAAAAD9fX2FzeW5jcGdfc3RtdF8zX18AU0VMRUNUICogRlJPTSBlbXBsb3llZXMgV0hFUkUgaWQgPSAkMQAAAEQAAAAYU19fYXN5bmNwZ19zdG10XzNfXwBIAAAABA==
+ describe:
+ object_type: 83
+ name: __asyncpg_stmt_3__
+ parse:
+ - name: __asyncpg_stmt_3__
+ query: SELECT * FROM employees WHERE id = $1
+ parameter_oids: []
+ msg_type: 68
+ auth_type: 0
+ postgresresponses:
+ - header: ["1", t, T]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ parameter_description:
+ parameteroids:
+ - 23
+ row_description: {fields: [{field_name: id, table_oid: 16386, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {field_name: first_name, table_oid: 16386, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: 54, format: 0}, {field_name: last_name, table_oid: 16386, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: 54, format: 0}, {field_name: email, table_oid: 16386, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: 104, format: 0}, {field_name: position, table_oid: 16386, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: 54, format: 0}, {field_name: salary, table_oid: 16386, table_attribute_number: 6, data_type_oid: 1700, data_type_size: -1, type_modifier: 655366, format: 0}, {field_name: date_hired, table_oid: 16386, table_attribute_number: 7, data_type_oid: 1082, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 84
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:25:57.958411237+05:30
+ restimestampmock: 2024-11-02T00:25:57.958479842+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-24
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAACoAX19hc3luY3BnX3N0bXRfM19fAAABAAEAAQAAAAQAAAABAAEAAUUAAAAJAAAAAAFTAAAABA==
+ bind:
+ - prepared_statement: __asyncpg_stmt_3__
+ parameter_format_codes: [1]
+ parameters: [[0, 0, 0, 1]]
+ result_format_codes: [1]
+ execute:
+ - max_rows: 1
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 0
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:25:57.964307531+05:30
+ restimestampmock: 2024-11-02T00:25:57.964414402+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-25
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:25:57.967177613+05:30
+ restimestampmock: 2024-11-02T00:25:57.967355116+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-26
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAACoAX19hc3luY3BnX3N0bXRfM19fAAABAAEAAQAAAAQAAAADAAEAAUUAAAAJAAAAAAFTAAAABA==
+ bind:
+ - prepared_statement: __asyncpg_stmt_3__
+ parameter_format_codes: [1]
+ parameters: [[0, 0, 0, 3]]
+ result_format_codes: [1]
+ execute:
+ - max_rows: 1
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 0
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:02.277859505+05:30
+ restimestampmock: 2024-11-02T00:26:02.278156136+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-27
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:02.281179011+05:30
+ restimestampmock: 2024-11-02T00:26:02.281388742+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-28
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAACoAX19hc3luY3BnX3N0bXRfM19fAAABAAEAAQAAAAQAAAACAAEAAUUAAAAJAAAAAAFTAAAABA==
+ bind:
+ - prepared_statement: __asyncpg_stmt_3__
+ parameter_format_codes: [1]
+ parameters: [[0, 0, 0, 2]]
+ result_format_codes: [1]
+ execute:
+ - max_rows: 1
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", D, s, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ data_row: [{row_values: ['b64:AAAAAg==', Dhruv, slashexx, slashexx@example.com, Developer, 'b64:AAEAAQAAAAIABg==', 'b64:AAAjbw==']}]
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:04.963927809+05:30
+ restimestampmock: 2024-11-02T00:26:04.965198376+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-29
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:04.970818229+05:30
+ restimestampmock: 2024-11-02T00:26:04.971874274+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-30
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [P, D]
+ identifier: ClientRequest
+ length: 8
+ payload: UAAAADtfX2FzeW5jcGdfc3RtdF80X18AREVMRVRFIEZST00gZW1wbG95ZWVzIFdIRVJFIGlkPSQxAAAARAAAABhTX19hc3luY3BnX3N0bXRfNF9fAEgAAAAE
+ describe:
+ object_type: 83
+ name: __asyncpg_stmt_4__
+ parse:
+ - name: __asyncpg_stmt_4__
+ query: DELETE FROM employees WHERE id=$1
+ parameter_oids: []
+ msg_type: 68
+ auth_type: 0
+ postgresresponses:
+ - header: ["1", t]
+ identifier: ServerResponse
+ length: 8
+ payload: MQAAAAR0AAAACgABAAAAF24AAAAE
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ parameter_description:
+ parameteroids:
+ - 23
+ msg_type: 116
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:18.473156914+05:30
+ restimestampmock: 2024-11-02T00:26:18.47327845+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-31
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAACoAX19hc3luY3BnX3N0bXRfNF9fAAABAAEAAQAAAAQAAAAFAAEAAUUAAAAJAAAAAABTAAAABA==
+ bind:
+ - prepared_statement: __asyncpg_stmt_4__
+ parameter_format_codes: [1]
+ parameters: [[0, 0, 0, 5]]
+ result_format_codes: [1]
+ execute:
+ - {}
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: DELETE 0
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:18.479261843+05:30
+ restimestampmock: 2024-11-02T00:26:18.479381902+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-32
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:18.48461228+05:30
+ restimestampmock: 2024-11-02T00:26:18.484716818+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-33
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAACoAX19hc3luY3BnX3N0bXRfNF9fAAABAAEAAQAAAAQAAAAIAAEAAUUAAAAJAAAAAABTAAAABA==
+ bind:
+ - prepared_statement: __asyncpg_stmt_4__
+ parameter_format_codes: [1]
+ parameters: [[0, 0, 0, 8]]
+ result_format_codes: [1]
+ execute:
+ - {}
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: DELETE 0
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:42.826314398+05:30
+ restimestampmock: 2024-11-02T00:26:42.826364365+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-34
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:42.829870394+05:30
+ restimestampmock: 2024-11-02T00:26:42.829976758+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-35
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [B, E]
+ identifier: ClientRequest
+ length: 8
+ payload: QgAAACoAX19hc3luY3BnX3N0bXRfNF9fAAABAAEAAQAAAAQAAAACAAEAAUUAAAAJAAAAAABTAAAABA==
+ bind:
+ - prepared_statement: __asyncpg_stmt_4__
+ parameter_format_codes: [1]
+ parameters: [[0, 0, 0, 2]]
+ result_format_codes: [1]
+ execute:
+ - {}
+ msg_type: 69
+ auth_type: 0
+ postgresresponses:
+ - header: ["2", C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: DELETE 1
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:45.439361257+05:30
+ restimestampmock: 2024-11-02T00:26:45.439457915+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-36
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAQQADAABjbGllbnRfZW5jb2RpbmcAJ3V0Zi04JwB1c2VyAG15dXNlcgBkYXRhYmFzZQBteWRhdGFiYXNlAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 56036
+ secret_key: 2072059547
+ parameter_status:
+ - name: in_hot_standby
+ value: "off"
+ - name: integer_datetimes
+ value: "on"
+ - name: TimeZone
+ value: Asia/Kolkata
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "off"
+ - name: application_name
+ value: ""
+ - name: default_transaction_read_only
+ value: "off"
+ - name: scram_iterations
+ value: "4096"
+ - name: DateStyle
+ value: ISO, MDY
+ - name: standard_conforming_strings
+ value: "on"
+ - name: session_authorization
+ value: myuser
+ - name: client_encoding
+ value: UTF8
+ - name: server_version
+ value: "16.3"
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.198788779+05:30
+ restimestampmock: 2024-11-02T00:24:00.206849467+05:30
+connectionId: "4"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-37
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAQQADAABjbGllbnRfZW5jb2RpbmcAJ3V0Zi04JwB1c2VyAG15dXNlcgBkYXRhYmFzZQBteWRhdGFiYXNlAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 56042
+ secret_key: 1801189782
+ parameter_status:
+ - name: in_hot_standby
+ value: "off"
+ - name: integer_datetimes
+ value: "on"
+ - name: TimeZone
+ value: Asia/Kolkata
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "off"
+ - name: application_name
+ value: ""
+ - name: default_transaction_read_only
+ value: "off"
+ - name: scram_iterations
+ value: "4096"
+ - name: DateStyle
+ value: ISO, MDY
+ - name: standard_conforming_strings
+ value: "on"
+ - name: session_authorization
+ value: myuser
+ - name: client_encoding
+ value: UTF8
+ - name: server_version
+ value: "16.3"
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.234047956+05:30
+ restimestampmock: 2024-11-02T00:24:00.234128761+05:30
+connectionId: "10"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-38
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAQQADAABjbGllbnRfZW5jb2RpbmcAJ3V0Zi04JwB1c2VyAG15dXNlcgBkYXRhYmFzZQBteWRhdGFiYXNlAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 56043
+ secret_key: 620349829
+ parameter_status:
+ - name: in_hot_standby
+ value: "off"
+ - name: integer_datetimes
+ value: "on"
+ - name: TimeZone
+ value: Asia/Kolkata
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "off"
+ - name: application_name
+ value: ""
+ - name: default_transaction_read_only
+ value: "off"
+ - name: scram_iterations
+ value: "4096"
+ - name: DateStyle
+ value: ISO, MDY
+ - name: standard_conforming_strings
+ value: "on"
+ - name: session_authorization
+ value: myuser
+ - name: client_encoding
+ value: UTF8
+ - name: server_version
+ value: "16.3"
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.223511405+05:30
+ restimestampmock: 2024-11-02T00:24:00.223563224+05:30
+connectionId: "12"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-39
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAQQADAABjbGllbnRfZW5jb2RpbmcAJ3V0Zi04JwB1c2VyAG15dXNlcgBkYXRhYmFzZQBteWRhdGFiYXNlAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 56044
+ secret_key: 3570427540
+ parameter_status:
+ - name: in_hot_standby
+ value: "off"
+ - name: integer_datetimes
+ value: "on"
+ - name: TimeZone
+ value: Asia/Kolkata
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "off"
+ - name: application_name
+ value: ""
+ - name: default_transaction_read_only
+ value: "off"
+ - name: scram_iterations
+ value: "4096"
+ - name: DateStyle
+ value: ISO, MDY
+ - name: standard_conforming_strings
+ value: "on"
+ - name: session_authorization
+ value: myuser
+ - name: client_encoding
+ value: UTF8
+ - name: server_version
+ value: "16.3"
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.246393386+05:30
+ restimestampmock: 2024-11-02T00:24:00.246505351+05:30
+connectionId: "14"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-40
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - header: [Q]
+ identifier: ClientRequest
+ length: 8
+ query:
+ string: SELECT pg_advisory_unlock_all(); CLOSE ALL; UNLISTEN *; RESET ALL;
+ msg_type: 81
+ auth_type: 0
+ postgresresponses:
+ - header: [T, D, C, C, C, C, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ command_complete:
+ - command_tag_type: SELECT 1
+ - command_tag_type: CLOSE CURSOR ALL
+ - command_tag_type: UNLISTEN
+ - command_tag_type: RESET
+ data_row: [{row_values: [""]}]
+ ready_for_query:
+ txstatus: 73
+ row_description: {fields: [{field_name: pg_advisory_unlock_all, table_oid: 0, table_attribute_number: 0, data_type_oid: 2278, data_type_size: 4, type_modifier: -1, format: 0}]}
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:26:45.440448264+05:30
+ restimestampmock: 2024-11-02T00:26:45.440621975+05:30
+connectionId: "0"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-41
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAQQADAABjbGllbnRfZW5jb2RpbmcAJ3V0Zi04JwB1c2VyAG15dXNlcgBkYXRhYmFzZQBteWRhdGFiYXNlAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 56046
+ secret_key: 3378630764
+ parameter_status:
+ - name: in_hot_standby
+ value: "off"
+ - name: integer_datetimes
+ value: "on"
+ - name: TimeZone
+ value: Asia/Kolkata
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "off"
+ - name: application_name
+ value: ""
+ - name: default_transaction_read_only
+ value: "off"
+ - name: scram_iterations
+ value: "4096"
+ - name: DateStyle
+ value: ISO, MDY
+ - name: standard_conforming_strings
+ value: "on"
+ - name: session_authorization
+ value: myuser
+ - name: client_encoding
+ value: UTF8
+ - name: server_version
+ value: "16.3"
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.254902613+05:30
+ restimestampmock: 2024-11-02T00:24:00.255027369+05:30
+connectionId: "16"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-42
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAQQADAABjbGllbnRfZW5jb2RpbmcAJ3V0Zi04JwB1c2VyAG15dXNlcgBkYXRhYmFzZQBteWRhdGFiYXNlAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 56045
+ secret_key: 3087317218
+ parameter_status:
+ - name: in_hot_standby
+ value: "off"
+ - name: integer_datetimes
+ value: "on"
+ - name: TimeZone
+ value: Asia/Kolkata
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "off"
+ - name: application_name
+ value: ""
+ - name: default_transaction_read_only
+ value: "off"
+ - name: scram_iterations
+ value: "4096"
+ - name: DateStyle
+ value: ISO, MDY
+ - name: standard_conforming_strings
+ value: "on"
+ - name: session_authorization
+ value: myuser
+ - name: client_encoding
+ value: UTF8
+ - name: server_version
+ value: "16.3"
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.251125068+05:30
+ restimestampmock: 2024-11-02T00:24:00.25123582+05:30
+connectionId: "18"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-43
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAQQADAABjbGllbnRfZW5jb2RpbmcAJ3V0Zi04JwB1c2VyAG15dXNlcgBkYXRhYmFzZQBteWRhdGFiYXNlAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 56037
+ secret_key: 3109363849
+ parameter_status:
+ - name: in_hot_standby
+ value: "off"
+ - name: integer_datetimes
+ value: "on"
+ - name: TimeZone
+ value: Asia/Kolkata
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "off"
+ - name: application_name
+ value: ""
+ - name: default_transaction_read_only
+ value: "off"
+ - name: scram_iterations
+ value: "4096"
+ - name: DateStyle
+ value: ISO, MDY
+ - name: standard_conforming_strings
+ value: "on"
+ - name: session_authorization
+ value: myuser
+ - name: client_encoding
+ value: UTF8
+ - name: server_version
+ value: "16.3"
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.22321499+05:30
+ restimestampmock: 2024-11-02T00:24:00.223318321+05:30
+connectionId: "6"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-44
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAQQADAABjbGllbnRfZW5jb2RpbmcAJ3V0Zi04JwB1c2VyAG15dXNlcgBkYXRhYmFzZQBteWRhdGFiYXNlAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 56035
+ secret_key: 3366720961
+ parameter_status:
+ - name: in_hot_standby
+ value: "off"
+ - name: integer_datetimes
+ value: "on"
+ - name: TimeZone
+ value: Asia/Kolkata
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "off"
+ - name: application_name
+ value: ""
+ - name: default_transaction_read_only
+ value: "off"
+ - name: scram_iterations
+ value: "4096"
+ - name: DateStyle
+ value: ISO, MDY
+ - name: standard_conforming_strings
+ value: "on"
+ - name: session_authorization
+ value: myuser
+ - name: client_encoding
+ value: UTF8
+ - name: server_version
+ value: "16.3"
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.199235016+05:30
+ restimestampmock: 2024-11-02T00:24:00.199320268+05:30
+connectionId: "2"
+---
+version: api.keploy.io/v1beta1
+kind: Postgres
+name: mock-45
+spec:
+ metadata:
+ type: config
+ postgresrequests:
+ - identifier: StartupRequest
+ payload: AAAAQQADAABjbGllbnRfZW5jb2RpbmcAJ3V0Zi04JwB1c2VyAG15dXNlcgBkYXRhYmFzZQBteWRhdGFiYXNlAAA=
+ auth_type: 0
+ postgresresponses:
+ - header: [R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z]
+ identifier: ServerResponse
+ length: 8
+ authentication_md5_password:
+ salt: [0, 0, 0, 0]
+ backend_key_data:
+ process_id: 56038
+ secret_key: 2167216798
+ parameter_status:
+ - name: in_hot_standby
+ value: "off"
+ - name: integer_datetimes
+ value: "on"
+ - name: TimeZone
+ value: Asia/Kolkata
+ - name: IntervalStyle
+ value: postgres
+ - name: is_superuser
+ value: "off"
+ - name: application_name
+ value: ""
+ - name: default_transaction_read_only
+ value: "off"
+ - name: scram_iterations
+ value: "4096"
+ - name: DateStyle
+ value: ISO, MDY
+ - name: standard_conforming_strings
+ value: "on"
+ - name: session_authorization
+ value: myuser
+ - name: client_encoding
+ value: UTF8
+ - name: server_version
+ value: "16.3"
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ - name: server_encoding
+ value: UTF8
+ ready_for_query:
+ txstatus: 73
+ msg_type: 90
+ auth_type: 0
+ reqtimestampmock: 2024-11-02T00:24:00.223405003+05:30
+ restimestampmock: 2024-11-02T00:24:00.22346753+05:30
+connectionId: "8"
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-1.yaml b/sanic-postgres/keploy/test-set-0/tests/test-1.yaml
new file mode 100755
index 0000000..cafa157
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-1.yaml
@@ -0,0 +1,48 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-1
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees
+ header:
+ Accept: '*/*'
+ Content-Length: "151"
+ Content-Type: application/json
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: |-
+ {
+ "first_name": "Bob",
+ "last_name": "Johnson",
+ "email": "bob.johnson@example.com",
+ "position": "Project Manager",
+ "salary": 75000
+ }
+ timestamp: 2024-11-02T00:24:11.530933247+05:30
+ resp:
+ status_code: 201
+ header:
+ Connection: keep-alive
+ Content-Length: "27"
+ Content-Type: application/json
+ body: '{"status":"Employee added"}'
+ status_message: Created
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:24:13.635103945+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1730487253
+curl: |-
+ curl --request POST \
+ --url http://localhost:8000/employees \
+ --header 'Host: localhost:8000' \
+ --header 'User-Agent: curl/8.10.1' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data "{\n \"first_name\": \"Bob\",\n \"last_name\": \"Johnson\",\n \"email\": \"bob.johnson@example.com\",\n \"position\": \"Project Manager\",\n \"salary\": 75000\n}"
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-10.yaml b/sanic-postgres/keploy/test-set-0/tests/test-10.yaml
new file mode 100755
index 0000000..72fe3cb
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-10.yaml
@@ -0,0 +1,37 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-10
+spec:
+ metadata: {}
+ req:
+ method: DELETE
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees/8
+ header:
+ Accept: '*/*'
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: ""
+ timestamp: 2024-11-02T00:26:42.824245581+05:30
+ resp:
+ status_code: 404
+ header:
+ Connection: keep-alive
+ Content-Length: "31"
+ Content-Type: application/json
+ body: '{"status":"Employee not found"}'
+ status_message: Not Found
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:26:44.916426565+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1730487404
+curl: |
+ curl --request DELETE \
+ --url http://localhost:8000/employees/8 \
+ --header 'Host: localhost:8000' \
+ --header 'User-Agent: curl/8.10.1' \
+ --header 'Accept: */*' \
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-11.yaml b/sanic-postgres/keploy/test-set-0/tests/test-11.yaml
new file mode 100755
index 0000000..c601433
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-11.yaml
@@ -0,0 +1,37 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-11
+spec:
+ metadata: {}
+ req:
+ method: DELETE
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees/2
+ header:
+ Accept: '*/*'
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: ""
+ timestamp: 2024-11-02T00:26:45.433382637+05:30
+ resp:
+ status_code: 200
+ header:
+ Connection: keep-alive
+ Content-Length: "29"
+ Content-Type: application/json
+ body: '{"status":"Employee deleted"}'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:26:47.530880511+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1730487407
+curl: |
+ curl --request DELETE \
+ --url http://localhost:8000/employees/2 \
+ --header 'User-Agent: curl/8.10.1' \
+ --header 'Accept: */*' \
+ --header 'Host: localhost:8000' \
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-2.yaml b/sanic-postgres/keploy/test-set-0/tests/test-2.yaml
new file mode 100755
index 0000000..6e02f3d
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-2.yaml
@@ -0,0 +1,48 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-2
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees
+ header:
+ Accept: '*/*'
+ Content-Length: "152"
+ Content-Type: application/json
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: |-
+ {
+ "first_name": "Charlie",
+ "last_name": "Brown",
+ "email": "charlie.brown@example.com",
+ "position": "Data Analyst",
+ "salary": 55000
+ }
+ timestamp: 2024-11-02T00:24:24.621246547+05:30
+ resp:
+ status_code: 201
+ header:
+ Connection: keep-alive
+ Content-Length: "27"
+ Content-Type: application/json
+ body: '{"status":"Employee added"}'
+ status_message: Created
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:24:26.732572815+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1730487266
+curl: |-
+ curl --request POST \
+ --url http://localhost:8000/employees \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:8000' \
+ --header 'User-Agent: curl/8.10.1' \
+ --data "{\n \"first_name\": \"Charlie\",\n \"last_name\": \"Brown\",\n \"email\": \"charlie.brown@example.com\",\n \"position\": \"Data Analyst\",\n \"salary\": 55000\n}"
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-3.yaml b/sanic-postgres/keploy/test-set-0/tests/test-3.yaml
new file mode 100755
index 0000000..be9e26f
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-3.yaml
@@ -0,0 +1,48 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-3
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees
+ header:
+ Accept: '*/*'
+ Content-Length: "149"
+ Content-Type: application/json
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: |-
+ {
+ "first_name": "Diana",
+ "last_name": "Prince",
+ "email": "diana.prince@example.com",
+ "position": "UX Designer",
+ "salary": 70000
+ }
+ timestamp: 2024-11-02T00:24:34.32675721+05:30
+ resp:
+ status_code: 201
+ header:
+ Connection: keep-alive
+ Content-Length: "27"
+ Content-Type: application/json
+ body: '{"status":"Employee added"}'
+ status_message: Created
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:24:36.388946121+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1730487276
+curl: |-
+ curl --request POST \
+ --url http://localhost:8000/employees \
+ --header 'User-Agent: curl/8.10.1' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:8000' \
+ --data "{\n \"first_name\": \"Diana\",\n \"last_name\": \"Prince\",\n \"email\": \"diana.prince@example.com\",\n \"position\": \"UX Designer\",\n \"salary\": 70000\n}"
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-4.yaml b/sanic-postgres/keploy/test-set-0/tests/test-4.yaml
new file mode 100755
index 0000000..90d4570
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-4.yaml
@@ -0,0 +1,48 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-4
+spec:
+ metadata: {}
+ req:
+ method: POST
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees
+ header:
+ Accept: '*/*'
+ Content-Length: "155"
+ Content-Type: application/json
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: |-
+ {
+ "first_name": "Ethan",
+ "last_name": "Hunt",
+ "email": "ethan.hunt@example.com",
+ "position": "Network Administrator",
+ "salary": 60000
+ }
+ timestamp: 2024-11-02T00:24:41.068808434+05:30
+ resp:
+ status_code: 201
+ header:
+ Connection: keep-alive
+ Content-Length: "27"
+ Content-Type: application/json
+ body: '{"status":"Employee added"}'
+ status_message: Created
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:24:43.124788378+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1730487283
+curl: |-
+ curl --request POST \
+ --url http://localhost:8000/employees \
+ --header 'Host: localhost:8000' \
+ --header 'User-Agent: curl/8.10.1' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --data "{\n \"first_name\": \"Ethan\",\n \"last_name\": \"Hunt\",\n \"email\": \"ethan.hunt@example.com\",\n \"position\": \"Network Administrator\",\n \"salary\": 60000\n}"
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-5.yaml b/sanic-postgres/keploy/test-set-0/tests/test-5.yaml
new file mode 100755
index 0000000..441d38f
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-5.yaml
@@ -0,0 +1,48 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-5
+spec:
+ metadata: {}
+ req:
+ method: PUT
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees/1
+ header:
+ Accept: '*/*'
+ Content-Length: "157"
+ Content-Type: application/json
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: |-
+ {
+ "first_name": "Frank",
+ "last_name": "Castle",
+ "email": "frank.castle@example.com",
+ "position": "Security Specialist",
+ "salary": 80000
+ }
+ timestamp: 2024-11-02T00:25:47.343116345+05:30
+ resp:
+ status_code: 404
+ header:
+ Connection: keep-alive
+ Content-Length: "31"
+ Content-Type: application/json
+ body: '{"status":"Employee not found"}'
+ status_message: Not Found
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:25:49.52236244+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1730487349
+curl: |-
+ curl --request PUT \
+ --url http://localhost:8000/employees/1 \
+ --header 'User-Agent: curl/8.10.1' \
+ --header 'Accept: */*' \
+ --header 'Content-Type: application/json' \
+ --header 'Host: localhost:8000' \
+ --data "{\n \"first_name\": \"Frank\",\n \"last_name\": \"Castle\",\n \"email\": \"frank.castle@example.com\",\n \"position\": \"Security Specialist\",\n \"salary\": 80000\n}"
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-6.yaml b/sanic-postgres/keploy/test-set-0/tests/test-6.yaml
new file mode 100755
index 0000000..acd2791
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-6.yaml
@@ -0,0 +1,37 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-6
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees/1
+ header:
+ Accept: '*/*'
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: ""
+ timestamp: 2024-11-02T00:25:57.955879435+05:30
+ resp:
+ status_code: 404
+ header:
+ Connection: keep-alive
+ Content-Length: "31"
+ Content-Type: application/json
+ body: '{"status":"Employee not found"}'
+ status_message: Not Found
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:25:59.977751505+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1730487359
+curl: |
+ curl --request GET \
+ --url http://localhost:8000/employees/1 \
+ --header 'Host: localhost:8000' \
+ --header 'User-Agent: curl/8.10.1' \
+ --header 'Accept: */*' \
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-7.yaml b/sanic-postgres/keploy/test-set-0/tests/test-7.yaml
new file mode 100755
index 0000000..3fff7c8
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-7.yaml
@@ -0,0 +1,37 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-7
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees/3
+ header:
+ Accept: '*/*'
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: ""
+ timestamp: 2024-11-02T00:26:02.274891841+05:30
+ resp:
+ status_code: 404
+ header:
+ Connection: keep-alive
+ Content-Length: "31"
+ Content-Type: application/json
+ body: '{"status":"Employee not found"}'
+ status_message: Not Found
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:26:04.302597857+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1730487364
+curl: |
+ curl --request GET \
+ --url http://localhost:8000/employees/3 \
+ --header 'Accept: */*' \
+ --header 'Host: localhost:8000' \
+ --header 'User-Agent: curl/8.10.1' \
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-8.yaml b/sanic-postgres/keploy/test-set-0/tests/test-8.yaml
new file mode 100755
index 0000000..7d23d7f
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-8.yaml
@@ -0,0 +1,38 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-8
+spec:
+ metadata: {}
+ req:
+ method: GET
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees/2
+ header:
+ Accept: '*/*'
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: ""
+ timestamp: 2024-11-02T00:26:04.960388094+05:30
+ resp:
+ status_code: 200
+ header:
+ Connection: keep-alive
+ Content-Length: "162"
+ Content-Type: application/json
+ body: '{"employee":{"id":2,"first_name":"Dhruv","last_name":"slashexx","email":"slashexx@example.com","position":"Developer","salary":60000.0,"date_hired":"2024-11-01"}}'
+ status_message: OK
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:26:07.014944126+05:30
+ objects: []
+ assertions:
+ noise:
+ body.employee.date_hired: []
+ created: 1730487367
+curl: |
+ curl --request GET \
+ --url http://localhost:8000/employees/2 \
+ --header 'Host: localhost:8000' \
+ --header 'User-Agent: curl/8.10.1' \
+ --header 'Accept: */*' \
diff --git a/sanic-postgres/keploy/test-set-0/tests/test-9.yaml b/sanic-postgres/keploy/test-set-0/tests/test-9.yaml
new file mode 100755
index 0000000..28f8605
--- /dev/null
+++ b/sanic-postgres/keploy/test-set-0/tests/test-9.yaml
@@ -0,0 +1,37 @@
+version: api.keploy.io/v1beta1
+kind: Http
+name: test-9
+spec:
+ metadata: {}
+ req:
+ method: DELETE
+ proto_major: 1
+ proto_minor: 1
+ url: http://localhost:8000/employees/5
+ header:
+ Accept: '*/*'
+ Host: localhost:8000
+ User-Agent: curl/8.10.1
+ body: ""
+ timestamp: 2024-11-02T00:26:18.470028007+05:30
+ resp:
+ status_code: 404
+ header:
+ Connection: keep-alive
+ Content-Length: "31"
+ Content-Type: application/json
+ body: '{"status":"Employee not found"}'
+ status_message: Not Found
+ proto_major: 0
+ proto_minor: 0
+ timestamp: 2024-11-02T00:26:20.586858053+05:30
+ objects: []
+ assertions:
+ noise: {}
+ created: 1730487380
+curl: |
+ curl --request DELETE \
+ --url http://localhost:8000/employees/5 \
+ --header 'User-Agent: curl/8.10.1' \
+ --header 'Accept: */*' \
+ --header 'Host: localhost:8000' \
diff --git a/sanic-postgres/requirements.txt b/sanic-postgres/requirements.txt
new file mode 100644
index 0000000..7543908
--- /dev/null
+++ b/sanic-postgres/requirements.txt
@@ -0,0 +1,43 @@
+attrs==23.2.1.dev0
+autocommand==2.2.2
+beautifulsoup4==4.12.3
+cffi==1.16.0
+charset-normalizer==3.3.2
+configobj==5.0.8
+cryptography==42.0.7
+dbus-python==1.3.2
+fastjsonschema==2.20.0
+filelock==3.13.3
+httplib2==0.22.0
+idna==3.8
+jaraco.context==5.3.0
+jaraco.functools==4.0.2
+jaraco.text==4.0.0
+libtorrent==2.0.10
+lxml==5.3.0
+Mako==1.3.5.dev0
+Markdown==3.7
+MarkupSafe==2.1.5
+more-itertools==10.3.0
+ordered-set==4.1.0
+packaging==24.1
+pillow==10.4.0
+platformdirs==4.3.6
+pwquality==1.4.5
+pycairo==1.27.0
+pycparser==2.22
+pycurl==7.45.3
+PyGObject==3.50.0
+pyparsing==3.1.2
+Reflector==2023.6.28.0.36.1
+requests==2.32.3
+setuptools==69.5.1
+six==1.16.0
+soupsieve==2.6
+tomli==2.0.1
+trove-classifiers==2024.10.21.16
+urllib3==1.26.20
+validate==5.0.8
+validate-pyproject==0.21
+variety==0.8.12
+wheel==0.44.0
diff --git a/sanic-postgres/server.py b/sanic-postgres/server.py
new file mode 100644
index 0000000..b28eb6f
--- /dev/null
+++ b/sanic-postgres/server.py
@@ -0,0 +1,123 @@
+from sanic import Sanic, response
+from asyncpg import create_pool
+import os
+from dotenv import load_dotenv
+
+app = Sanic("EmployeeManagementApp")
+
+load_dotenv()
+DB_URL = os.getenv("DATABASE_URL")
+
+DB_CONFIG = {
+ "dsn": DB_URL,
+}
+
+@app.listener("before_server_start")
+async def setup_db(app, loop):
+ app.ctx.db_pool = await create_pool(**DB_CONFIG, loop=loop)
+
+@app.listener("after_server_stop")
+async def close_db(app, loop):
+ await app.ctx.db_pool.close()
+
+@app.route("/employees", methods=["POST"])
+async def add_employee(request):
+ data = request.json
+ async with app.ctx.db_pool.acquire() as connection:
+ await connection.execute(
+ "INSERT INTO employees (first_name, last_name, email, position, salary) VALUES ($1, $2, $3, $4, $5)",
+ data["first_name"], data["last_name"], data["email"], data["position"], data["salary"]
+ )
+ return response.json({"status": "Employee added"}, status=201)
+
+@app.route("/employees", methods=["GET"])
+async def get_employees(request):
+ async with app.ctx.db_pool.acquire() as connection:
+ rows = await connection.fetch("SELECT * FROM employees")
+ employees = [{"id": row["id"], "first_name": row["first_name"], "last_name": row["last_name"],
+ "email": row["email"], "position": row["position"], "salary": row["salary"],
+ "date_hired": row["date_hired"].isoformat()} for row in rows]
+ return response.json({"employees": employees})
+
+@app.route("/employees/", methods=["GET"])
+async def get_employee(request, employee_id):
+ try:
+ employee_id = int(employee_id)
+ except ValueError:
+ return response.json({"status": "Invalid employee ID"}, status=400)
+
+ async with app.ctx.db_pool.acquire() as connection:
+ row = await connection.fetchrow("SELECT * FROM employees WHERE id = $1", employee_id)
+
+ if row is None:
+ return response.json({"status": "Employee not found"}, status=404)
+
+ employee = {
+ "id": row["id"],
+ "first_name": row["first_name"],
+ "last_name": row["last_name"],
+ "email": row["email"],
+ "position": row["position"],
+ "salary": row["salary"],
+ "date_hired": row["date_hired"].isoformat() if row["date_hired"] else None
+ }
+
+ return response.json({"employee": employee})
+
+@app.route("/employees/", methods=["PUT"])
+async def update_employee(request, employee_id):
+ try:
+ employee_id = int(employee_id)
+ except ValueError:
+ return response.json({"status": "Invalid employee ID"}, status=400)
+
+ updated_data = request.json
+ required_fields = ["first_name", "last_name", "email", "position", "salary"]
+ for field in required_fields:
+ if field not in updated_data:
+ return response.json({"status": f"Missing field: {field}"}, status=400)
+
+ async with app.ctx.db_pool.acquire() as connection:
+ result = await connection.execute(
+ """
+ UPDATE employees
+ SET first_name = $1,
+ last_name = $2,
+ email = $3,
+ position = $4,
+ salary = $5
+ WHERE id = $6
+ """,
+ updated_data["first_name"],
+ updated_data["last_name"],
+ updated_data["email"],
+ updated_data["position"],
+ float(updated_data["salary"]),
+ employee_id
+ )
+
+ if result == "UPDATE 0":
+ return response.json({"status": "Employee not found"}, status=404)
+
+ return response.json({"status": "Employee updated"})
+
+# Function to delete an employee
+@app.route("/employees/", methods=["DELETE"])
+async def delete_employee(request, employee_id):
+ try:
+ employee_id = int(employee_id)
+ except ValueError:
+ return response.json({"status": "Invalid employee ID"}, status=400)
+
+ async with app.ctx.db_pool.acquire() as connection:
+ result = await connection.execute(
+ "DELETE FROM employees WHERE id=$1", employee_id
+ )
+
+ if result == "DELETE 0":
+ return response.json({"status": "Employee not found"}, status=404)
+
+ return response.json({"status": "Employee deleted"})
+
+if __name__ == "__main__":
+ app.run(host="0.0.0.0", port=8000)