From 2b7adc3d36324beb908cfabe6362f548235f594e Mon Sep 17 00:00:00 2001 From: "sandro.meireles" Date: Fri, 31 May 2024 10:36:08 -0300 Subject: [PATCH] feat: Add exact_value field in the TestPlan model --- .../migrations/0002_testplan_exact_value.py | 22 +++++++++++++++++++ apip/testplans/models.py | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 apip/testplans/migrations/0002_testplan_exact_value.py diff --git a/apip/testplans/migrations/0002_testplan_exact_value.py b/apip/testplans/migrations/0002_testplan_exact_value.py new file mode 100644 index 0000000..91fb7a0 --- /dev/null +++ b/apip/testplans/migrations/0002_testplan_exact_value.py @@ -0,0 +1,22 @@ +# Generated by Django 5.0 on 2024-05-31 02:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("testplans", "0001_initial"), + ] + + operations = [ + migrations.AddField( + model_name="testplan", + name="exact_value", + field=models.BooleanField( + default=False, + help_text="This field indicates that the value returned will be the same as that defined in schema", + verbose_name="Exact Value", + ), + ), + ] diff --git a/apip/testplans/models.py b/apip/testplans/models.py index fcb5485..2c4158e 100644 --- a/apip/testplans/models.py +++ b/apip/testplans/models.py @@ -6,6 +6,11 @@ class TestPlan(models.Model): endpoint = models.CharField(max_length=255) service = models.ForeignKey(Service, on_delete=models.CASCADE, related_name="plans") + exact_value = models.BooleanField( + "Exact Value", + help_text="This field indicates that the value returned will be the same as that defined in schema", + default=False + ) schema = models.JSONField(null=True, default=dict) def __str__(self) -> str: