From 322b6e685312f7ee852081fff38e43a8e2117d6c Mon Sep 17 00:00:00 2001 From: Aakash Singh Date: Wed, 13 Dec 2023 16:27:38 +0530 Subject: [PATCH] add more fixtures --- .../management/commands/load_dummy_data.py | 8 +- data/dummy/states.json | 269 ++++++++++++++++++ data/dummy/users.json | 6 +- 3 files changed, 277 insertions(+), 6 deletions(-) diff --git a/care/facility/management/commands/load_dummy_data.py b/care/facility/management/commands/load_dummy_data.py index 6a3d64c463..add8122875 100644 --- a/care/facility/management/commands/load_dummy_data.py +++ b/care/facility/management/commands/load_dummy_data.py @@ -24,9 +24,11 @@ def handle(self, *args, **options): try: management.call_command("loaddata", self.BASE_URL + "states.json") management.call_command("load_skill_data") - management.call_command("load_medicines_data") management.call_command("seed_data") - management.call_command("loaddata", self.BASE_URL + "users.json") - management.call_command("loaddata", self.BASE_URL + "facility.json") + management.call_command( + "loaddata", + self.BASE_URL + "users.json", + self.BASE_URL + "facility.json", + ) except Exception as e: raise CommandError(e) diff --git a/data/dummy/states.json b/data/dummy/states.json index c5d35562ce..9f136de1fa 100644 --- a/data/dummy/states.json +++ b/data/dummy/states.json @@ -52,6 +52,36 @@ "localbody_code": "M070800" } }, + { + "model": "users.localbody", + "pk": 704, + "fields": { + "district": 7, + "name": "Poothrikka Grama Panchayat, Ernakulam District", + "body_type": 1, + "localbody_code": "G071001" + } + }, + { + "model": "users.localbody", + "pk": 25, + "fields": { + "district": 7, + "name": "Amballoor Grama Panchayat, Ernakulam District", + "body_type": 1, + "localbody_code": "G070905" + } + }, + { + "model": "users.localbody", + "pk": 32, + "fields": { + "district": 7, + "name": "Angamaly Block Panchayat, Ernakulam District", + "body_type": 2, + "localbody_code": "B070300" + } + }, { "model": "users.localbody", "pk": 95, @@ -62,6 +92,56 @@ "localbody_code": "M050300" } }, + { + "model": "users.localbody", + "pk": 8, + "fields": { + "district": 5, + "name": "Akalakunnam Grama Panchayat, Kottayam District", + "body_type": 1, + "localbody_code": "G050701" + } + }, + { + "model": "users.localbody", + "pk": 47, + "fields": { + "district": 5, + "name": "Arpookara Grama Panchayat, Kottayam District", + "body_type": 1, + "localbody_code": "G050304" + } + }, + { + "model": "users.localbody", + "pk": 56, + "fields": { + "district": 5, + "name": "Athirampuzha Grama Panchayat, Kottayam District", + "body_type": 1, + "localbody_code": "G050303" + } + }, + { + "model": "users.localbody", + "pk": 66, + "fields": { + "district": 5, + "name": "Ayarkunnam Grama Panchayat, Kottayam District", + "body_type": 1, + "localbody_code": "G050801" + } + }, + { + "model": "users.localbody", + "pk": 68, + "fields": { + "district": 5, + "name": "Aymanam Grama Panchayat, Kottayam District", + "body_type": 1, + "localbody_code": "G050302" + } + }, { "model": "users.ward", "pk": 5896, @@ -88,5 +168,194 @@ "name": "PAZHAMTHOTTAM", "number": 1 } + }, + { + "model": "users.ward", + "pk": 15100, + "fields": { + "local_body": 704, + "name": "THAMMANIMATTOM", + "number": 7 + } + }, + { + "model": "users.ward", + "pk": 6054, + "fields": { + "local_body": 95, + "name": "PULIYAMPURAM", + "number": 17 + } + }, + { + "model": "users.ward", + "pk": 5341, + "fields": { + "local_body": 20, + "name": "KURAKKANNI", + "number": 33 + } + }, + { + "model": "users.ward", + "pk": 8279, + "fields": { + "local_body": 6, + "name": "ALAKUNNAM", + "number": 14 + } + }, + { + "model": "users.ward", + "pk": 17847, + "fields": { + "local_body": 704, + "name": "KALLAMKUZHI", + "number": 15 + } + }, + { + "model": "users.ward", + "pk": 20600, + "fields": { + "local_body": 25, + "name": "PURAMUNDEKKADU", + "number": 9 + } + }, + { + "model": "users.ward", + "pk": 6713, + "fields": { + "local_body": 25, + "name": "KALATHILAKKARA", + "number": 22 + } + }, + { + "model": "users.ward", + "pk": 9648, + "fields": { + "local_body": 32, + "name": "THEKKECHERRY", + "number": 14 + } + }, + { + "model": "users.ward", + "pk": 10117, + "fields": { + "local_body": 32, + "name": "ELAKUTTOOR", + "number": 5 + } + }, + { + "model": "users.ward", + "pk": 2100, + "fields": { + "local_body": 95, + "name": "VENKUNNU", + "number": 11 + } + }, + { + "model": "users.ward", + "pk": 18268, + "fields": { + "local_body": 95, + "name": "PARAKKAL", + "number": 7 + } + }, + { + "model": "users.ward", + "pk": 7661, + "fields": { + "local_body": 8, + "name": "PAUTHI", + "number": 20 + } + }, + { + "model": "users.ward", + "pk": 4363, + "fields": { + "local_body": 8, + "name": "PERUMANNA", + "number": 15 + } + }, + { + "model": "users.ward", + "pk": 17098, + "fields": { + "local_body": 47, + "name": "THEKKUMCHERRY", + "number": 5 + } + }, + { + "model": "users.ward", + "pk": 16347, + "fields": { + "local_body": 47, + "name": "KANNANTHRIKKOVIL", + "number": 6 + } + }, + { + "model": "users.ward", + "pk": 11330, + "fields": { + "local_body": 56, + "name": "M C H WARD", + "number": 17 + } + }, + { + "model": "users.ward", + "pk": 6665, + "fields": { + "local_body": 56, + "name": "KOPPAM", + "number": 18 + } + }, + { + "model": "users.ward", + "pk": 15052, + "fields": { + "local_body": 66, + "name": "MANJAKKAD", + "number": 11 + } + }, + { + "model": "users.ward", + "pk": 19236, + "fields": { + "local_body": 66, + "name": "POTTIPPARA", + "number": 22 + } + }, + { + "model": "users.ward", + "pk": 2203, + "fields": { + "local_body": 68, + "name": "PAYYAVOOR", + "number": 12 + } + }, + { + "model": "users.ward", + "pk": 1911, + "fields": { + "local_body": 68, + "name": "MURIYATHODE", + "number": 5 + } } ] diff --git a/data/dummy/users.json b/data/dummy/users.json index 3b809cb414..c48e8f5aa1 100644 --- a/data/dummy/users.json +++ b/data/dummy/users.json @@ -703,7 +703,7 @@ "model": "users.user", "pk": 21, "fields": { - "password": "argon2$argon2i$v=19$m=512,t=2,p=2$TTBSdHR5U2tlTHNT$YAw7zxAUVGlIUCWH6ejUtg", + "password": "argon2$argon2i$v=19$m=512,t=2,p=2$Tjk2THBOVnZqbW9O$Q1PFLkEcY/3grHVSo7rWvw", "last_login": null, "is_superuser": false, "first_name": "Dev", @@ -723,7 +723,7 @@ "alt_phone_number": "+919876543219", "gender": 1, "age": 20, - "home_facility": null, + "home_facility": 1, "verified": true, "deleted": false, "pf_endpoint": null, @@ -758,7 +758,7 @@ "alt_phone_number": "+919876543219", "gender": 1, "age": 20, - "home_facility": null, + "home_facility": 1, "verified": true, "deleted": false, "pf_endpoint": null,