From 514e4a36cf2d2fa2547da70d67b53a788069b80e Mon Sep 17 00:00:00 2001 From: Sushil Tiwari Date: Tue, 17 Sep 2024 14:48:12 +0545 Subject: [PATCH] Add translation logic for summary in fieldreport and event Fix test cases for the snapshots --- api/admin.py | 5 +- api/factories/event.py | 3 +- api/factories/field_report.py | 1 + ...ort_title_fieldreport_title_ar_and_more.py | 38 -- ..._event_title_ar_event_title_en_and_more.py | 63 +++ api/models.py | 68 ++- api/receivers.py | 26 +- api/serializers.py | 4 +- api/test_models.py | 14 +- api/test_views.py | 21 +- api/translation.py | 2 +- deployments/snapshots/snap_tests.py | 455 ++++-------------- deployments/tests.py | 46 +- 13 files changed, 304 insertions(+), 442 deletions(-) delete mode 100644 api/migrations/0214_fieldreport_title_fieldreport_title_ar_and_more.py create mode 100644 api/migrations/0215_event_title_event_title_ar_event_title_en_and_more.py diff --git a/api/admin.py b/api/admin.py index f36951600..f25b7abad 100644 --- a/api/admin.py +++ b/api/admin.py @@ -219,6 +219,7 @@ class EventAdmin(CompareVersionAdmin, RegionRestrictedAdmin, TranslationAdmin): "districts", "parent_event", ) + readonly_fields = ("name",) def appeals(self, instance): if getattr(instance, "appeals").exists(): @@ -331,7 +332,7 @@ class FieldReportAdmin(CompareVersionAdmin, RegionRestrictedAdmin, TranslationAd def create_events(self, request, queryset): for report in queryset: event = models.Event.objects.create( - name=report.summary, + title=report.title, dtype=getattr(report, "dtype"), disaster_start_date=getattr(report, "created_at"), auto_generated=True, @@ -431,7 +432,7 @@ class AppealAdmin(CompareVersionAdmin, RegionRestrictedAdmin, TranslationAdmin): def create_events(self, request, queryset): for appeal in queryset: event = models.Event.objects.create( - name=appeal.name, + title=appeal.name, dtype=getattr(appeal, "dtype"), disaster_start_date=getattr(appeal, "start_date"), auto_generated=True, diff --git a/api/factories/event.py b/api/factories/event.py index 855c9ccd2..71bf55b62 100644 --- a/api/factories/event.py +++ b/api/factories/event.py @@ -22,7 +22,8 @@ class EventFactory(factory.django.DjangoModelFactory): class Meta: model = Event - name = fuzzy.FuzzyText(length=50, prefix="event-") + name = fuzzy.FuzzyText(length=50) + title = fuzzy.FuzzyText(length=10) slug = fuzzy.FuzzyText(length=50) dtype = factory.SubFactory(DisasterTypeFactory) diff --git a/api/factories/field_report.py b/api/factories/field_report.py index 5ad5a6544..d4c7a4d05 100644 --- a/api/factories/field_report.py +++ b/api/factories/field_report.py @@ -17,6 +17,7 @@ class Meta: dtype = factory.SubFactory(disaster_type.DisasterTypeFactory) event = factory.SubFactory(event.EventFactory) summary = fuzzy.FuzzyText(length=500) + title = fuzzy.FuzzyText(length=10, prefix="title-") description = fuzzy.FuzzyText(length=200) report_date = fuzzy.FuzzyDateTime(datetime.datetime(2008, 1, 1, tzinfo=pytz.utc)) # start_date is now what the user explicitly sets while filling the Field Report form. diff --git a/api/migrations/0214_fieldreport_title_fieldreport_title_ar_and_more.py b/api/migrations/0214_fieldreport_title_fieldreport_title_ar_and_more.py deleted file mode 100644 index 38925900b..000000000 --- a/api/migrations/0214_fieldreport_title_fieldreport_title_ar_and_more.py +++ /dev/null @@ -1,38 +0,0 @@ -# Generated by Django 4.2.15 on 2024-09-13 08:21 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('api', '0213_merge_20240807_1001'), - ] - - operations = [ - migrations.AddField( - model_name='fieldreport', - name='title', - field=models.CharField(blank=True, max_length=256), - ), - migrations.AddField( - model_name='fieldreport', - name='title_ar', - field=models.CharField(blank=True, max_length=256, null=True), - ), - migrations.AddField( - model_name='fieldreport', - name='title_en', - field=models.CharField(blank=True, max_length=256, null=True), - ), - migrations.AddField( - model_name='fieldreport', - name='title_es', - field=models.CharField(blank=True, max_length=256, null=True), - ), - migrations.AddField( - model_name='fieldreport', - name='title_fr', - field=models.CharField(blank=True, max_length=256, null=True), - ), - ] diff --git a/api/migrations/0215_event_title_event_title_ar_event_title_en_and_more.py b/api/migrations/0215_event_title_event_title_ar_event_title_en_and_more.py new file mode 100644 index 000000000..686006441 --- /dev/null +++ b/api/migrations/0215_event_title_event_title_ar_event_title_en_and_more.py @@ -0,0 +1,63 @@ +# Generated by Django 4.2.16 on 2024-10-07 18:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("api", "0214_alter_profile_limit_access_to_guest"), + ] + + operations = [ + migrations.AddField( + model_name="event", + name="title", + field=models.CharField(blank=True, max_length=256), + ), + migrations.AddField( + model_name="event", + name="title_ar", + field=models.CharField(blank=True, max_length=256, null=True), + ), + migrations.AddField( + model_name="event", + name="title_en", + field=models.CharField(blank=True, max_length=256, null=True), + ), + migrations.AddField( + model_name="event", + name="title_es", + field=models.CharField(blank=True, max_length=256, null=True), + ), + migrations.AddField( + model_name="event", + name="title_fr", + field=models.CharField(blank=True, max_length=256, null=True), + ), + migrations.AddField( + model_name="fieldreport", + name="title", + field=models.CharField(blank=True, max_length=256), + ), + migrations.AddField( + model_name="fieldreport", + name="title_ar", + field=models.CharField(blank=True, max_length=256, null=True), + ), + migrations.AddField( + model_name="fieldreport", + name="title_en", + field=models.CharField(blank=True, max_length=256, null=True), + ), + migrations.AddField( + model_name="fieldreport", + name="title_es", + field=models.CharField(blank=True, max_length=256, null=True), + ), + migrations.AddField( + model_name="fieldreport", + name="title_fr", + field=models.CharField(blank=True, max_length=256, null=True), + ), + ] diff --git a/api/models.py b/api/models.py index eb3c5429c..956c52a63 100644 --- a/api/models.py +++ b/api/models.py @@ -19,9 +19,13 @@ # from django.db.models import Prefetch from django.dispatch import receiver from django.utils import timezone +from django.utils.translation import activate, deactivate from django.utils.translation import gettext_lazy as _ +from modeltranslation.utils import build_localized_fieldname from tinymce.models import HTMLField +from lang.translation import AVAILABLE_LANGUAGES + from .utils import validate_slug_number # is_user_ifrc, @@ -750,7 +754,7 @@ class Event(models.Model): ) image = models.ImageField(verbose_name=_("image"), null=True, blank=True, upload_to=snippet_image_path) summary = HTMLField(verbose_name=_("summary"), blank=True, default="") - # title = models.CharField(max_length=256, blank=True) + title = models.CharField(max_length=256, blank=True) num_injured = models.IntegerField(verbose_name=_("number of injured"), null=True, blank=True) num_dead = models.IntegerField(verbose_name=_("number of dead"), null=True, blank=True) @@ -845,6 +849,16 @@ def record_type(self): def to_dict(self): return to_dict(self) + def generate_formatted_name(self): + country_iso3 = self.countries.first().iso3 if self.id and self.countries.first() else "N/A" + dtype = self.dtype.name if self.dtype else "N/A" + start_date = timezone.now().strftime("%m-%Y") + for lang in AVAILABLE_LANGUAGES: + activate(lang) + self.name = f"{country_iso3}: {dtype} - {start_date} - {self.title}" + deactivate() + yield build_localized_fieldname("name", lang) + def save(self, *args, **kwargs): # Make the slug lowercase @@ -855,6 +869,15 @@ def save(self, *args, **kwargs): if not self.id and not self.disaster_start_date: self.disaster_start_date = timezone.now() + updated_name_fields = list(self.generate_formatted_name()) + + # Updating the updated_fields with the fields that are updated + if kwargs.get("update_fields"): + kwargs["update_fields"] = ( + *kwargs["update_fields"], + *updated_name_fields, + ) + return super(Event, self).save(*args, **kwargs) def __str__(self): @@ -1647,32 +1670,39 @@ class Meta: # if is_user_ifrc(user): # filters = models.Q() - def generate_formatted_summary(self) -> str: - translations = { - "summary_en": self.title_en, - "summary_fr": self.title_fr, - "summary_es": self.title_es, - "summary_ar": self.title_ar, - } - country = self.countries.first() - disater = self.dtype + def generate_formatted_summary(self): + country_iso3 = self.countries.first().iso3 if self.id and self.countries.first() else "N/A" + dtype = self.dtype.name if self.dtype else "N/A" start_date = self.start_date.strftime("%m-%Y") - - field_report_number = FieldReport.objects.filter(countries=country).count() - date = timezone.now().strftime("%Y-%m-%d") - for summary_field, title in translations.items(): - if title: - summary = f"{country.iso3}: {disater.name} - {start_date} {title} #{field_report_number} ({date})" - setattr(self, summary_field, summary) + field_report_number = FieldReport.objects.filter(countries__iso3=country_iso3).exclude(id=self.id).count() + 1 + current_date = timezone.now().strftime("%Y-%m-%d") + + for lang in AVAILABLE_LANGUAGES: + activate(lang) + if self.is_covid_report: + # {ISO3}: COVID-19 #{Field Report Number} ({Date}) + self.summary = f"{country_iso3}: COVID-19 #{field_report_number} ({current_date})" + else: + # {ISO3}: {Disaster Type} - {Start Date} #{Field Report Number} ({Date}) + self.summary = f"{country_iso3}: {dtype} - {start_date} {self.title} #{field_report_number} ({current_date})" + deactivate() + yield build_localized_fieldname("summary", lang) def save(self, *args, **kwargs): - # On save, is report_date or start_date is not set, set it to now. + # On save, if report_date or start_date is not set, set it to now. if not self.id and not self.report_date: self.report_date = timezone.now() if not self.id and not self.start_date: self.start_date = timezone.now() # NOTE: Overriding the summary field with translated title - self.generate_formatted_summary() + updated_summary_list = list(self.generate_formatted_summary()) + + # NOTE: Updating the updated_fields by translation tasks + if kwargs.get("update_fields"): + kwargs["update_fields"] = ( + *kwargs["update_fields"], + *updated_summary_list, + ) return super(FieldReport, self).save(*args, **kwargs) diff --git a/api/receivers.py b/api/receivers.py index eb7a2db97..75d782a5c 100644 --- a/api/receivers.py +++ b/api/receivers.py @@ -3,7 +3,13 @@ from django.db import transaction from django.db.models import Q -from django.db.models.signals import post_delete, post_save, pre_delete, pre_save +from django.db.models.signals import ( + m2m_changed, + post_delete, + post_save, + pre_delete, + pre_save, +) from django.dispatch import receiver from django.utils import timezone from reversion.models import Version @@ -276,3 +282,21 @@ def remove_appeal_filter(sender, instance, using, **kwargs): appealFilter.value = ",".join(lstCodesToSkip) appealFilter.save() + + +@receiver(m2m_changed, sender=Event.countries.through) +def update_event_name(sender, instance, action, **kwargs): + """ + Update the event name when the countries are changed. + """ + if action in ["post_add", "post_remove"]: + instance.save() + + +@receiver(m2m_changed, sender=FieldReport.countries.through) +def update_fieldreport_summary(sender, instance, action, **kwargs): + """ + Update the FieldReport summary when the countries are changed. + """ + if action in ["post_add", "post_remove"]: + instance.save() diff --git a/api/serializers.py b/api/serializers.py index 0ab8c4b1b..45d418801 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -1136,6 +1136,7 @@ class Meta: "dtype", "countries", "summary", + "title", "num_affected", "ifrc_severity_level", "ifrc_severity_level_display", @@ -1271,6 +1272,7 @@ class Meta: "countries", "districts", "summary", + "title", "num_affected", "tab_two_title", "tab_three_title", @@ -2027,7 +2029,7 @@ class Meta: def create_event(self, report): event = Event.objects.create( - name=report.title, + title=report.title, dtype=report.dtype, summary=report.description or "", disaster_start_date=report.start_date, diff --git a/api/test_models.py b/api/test_models.py index f63d3355c..1038f3505 100644 --- a/api/test_models.py +++ b/api/test_models.py @@ -26,14 +26,14 @@ class EventTest(TestCase): def setUp(self): dtype = models.DisasterType.objects.get(pk=1) - models.Event.objects.create(name="disaster1", summary="test disaster", dtype=dtype) - event = models.Event.objects.create(name="disaster2", summary="another test disaster", dtype=dtype) + models.Event.objects.create(title="disaster1", summary="test disaster", dtype=dtype) + event = models.Event.objects.create(title="disaster2", summary="another test disaster", dtype=dtype) models.KeyFigure.objects.create(event=event, number=7, deck="things", source="website") models.Snippet.objects.create(event=event, snippet="this is a snippet") def test_disaster_create(self): - obj1 = models.Event.objects.get(name="disaster1") - obj2 = models.Event.objects.get(name="disaster2") + obj1 = models.Event.objects.get(title="disaster1") + obj2 = models.Event.objects.get(title="disaster2") self.assertEqual(obj1.summary, "test disaster") self.assertEqual(obj2.summary, "another test disaster") keyfig = obj2.key_figures.all() @@ -68,7 +68,7 @@ def test_profile_create(self): class AppealTest(APITestCase): def setUp(self): # An appeal with needs_confirmation=True should not return the event in the API response. - event = models.Event.objects.create(name="associated event", summary="foo") + event = models.Event.objects.create(title="associated event", summary="foo") country = models.Country.objects.create(name="country") models.Appeal.objects.create( aid="test1", name="appeal", atype=1, code="abc", needs_confirmation=True, event=event, country=country @@ -87,13 +87,13 @@ class FieldReportTest(TestCase): def setUp(self): dtype = models.DisasterType.objects.get(pk=1) - event = models.Event.objects.create(name="disaster1", summary="test disaster", dtype=dtype) + event = models.Event.objects.create(title="disaster1", summary="test disaster", dtype=dtype) country = models.Country.objects.create(name="country") report = models.FieldReport.objects.create(rid="test1", event=event, dtype=dtype) report.countries.add(country) def test_field_report_create(self): - event = models.Event.objects.get(name="disaster1") + event = models.Event.objects.get(title="disaster1") country = models.Country.objects.get(name="country") self.assertEqual(event.field_reports.all()[0].countries.all()[0], country) obj = models.FieldReport.objects.get(rid="test1") diff --git a/api/test_views.py b/api/test_views.py index ecb744887..0f12725b2 100644 --- a/api/test_views.py +++ b/api/test_views.py @@ -1,5 +1,3 @@ -import json - from django.contrib.auth.models import User import api.models as models @@ -13,7 +11,7 @@ from api.factories.field_report import FieldReportFactory from api.models import Profile, VisibilityChoices from deployments.factories.user import UserFactory -from main.test_case import APITestCase, SnapshotTestCase +from main.test_case import APITestCase class GuestUserPermissionTest(APITestCase): @@ -254,20 +252,21 @@ def test_get_auth(self): self.assertIsNotNone(response.get("expires")) -class EventSnaphostTest(SnapshotTestCase): +class EventApiTest(APITestCase): + def test_event_featured_document_api(self): event = EventFactory() EventFeaturedDocumentFactory.create_batch(5, event=event) resp = self.client.get(f"/api/v2/event/{event.id}/") self.assertEqual(resp.status_code, 200) - self.assertMatchSnapshot(json.loads(resp.content)) + self.assertEqual(len(resp.json()["featured_documents"]), 5) def test_event_link_api(self): event = EventFactory() EventLinkFactory.create_batch(5, event=event) resp = self.client.get(f"/api/v2/event/{event.id}/") self.assertEqual(resp.status_code, 200) - self.assertMatchSnapshot(json.loads(resp.content)) + self.assertEqual(len(resp.json()["links"]), 5) class SituationReportTypeTest(APITestCase): @@ -278,7 +277,7 @@ def test_sit_rep_types(self): type1 = models.SituationReportType.objects.create(type="Lyric") type2 = models.SituationReportType.objects.create(type="Epic") dtype1 = models.DisasterType.objects.get(pk=1) - event1 = models.Event.objects.create(name="disaster1", summary="test disaster1", dtype=dtype1) + event1 = models.Event.objects.create(title="disaster1", summary="test disaster1", dtype=dtype1) models.SituationReport.objects.create(name="test1", event=event1, type=type1, visibility=3) models.SituationReport.objects.create(name="test2", event=event1, type=type2, visibility=3) @@ -311,7 +310,7 @@ def test_create_and_update(self): body = { "countries": [country1.id, country2.id], "dtype": 7, - "summary": "test", + "title": "test", "description": "this is a test description", "bulletin": "3", "num_assisted": 100, @@ -351,12 +350,12 @@ def test_create_and_update(self): self.assertEqual(created.contacts.count(), 1) self.assertEqual(created.visibility, models.VisibilityChoices.IFRC) self.assertEqual(created.dtype.id, 7) - self.assertEqual(created.summary, "test") + self.assertEqual(created.title, "test") # Translated field test - self.assertEqual(created.summary_en, "test") + self.assertEqual(created.title_en, "test") # created an emergency automatically - self.assertEqual(created.event.name, "test") + self.assertEqual(created.event.title, "test") # event_pk = created.event.id # body['countries'] = [country2.id] diff --git a/api/translation.py b/api/translation.py index 46ffc0d38..a68847800 100644 --- a/api/translation.py +++ b/api/translation.py @@ -78,7 +78,7 @@ class DisasterTypeTO(TranslationOptions): @register(Event) class EventTO(TranslationOptions): - fields = ("name", "summary") + fields = ("name", "summary", "title") skip_fields = ("name",) # XXX: CUSTOM field Not used by TranslationOptions, but used in lang/tasks.py diff --git a/deployments/snapshots/snap_tests.py b/deployments/snapshots/snap_tests.py index 119bc3c56..5b6754c76 100644 --- a/deployments/snapshots/snap_tests.py +++ b/deployments/snapshots/snap_tests.py @@ -7,13 +7,34 @@ snapshots = Snapshot() snapshots["TestProjectAPI::test_global_project_api 1"] = { - "ns_with_ongoing_activities": 16, + "ns_with_ongoing_activities": 2, "projects_per_programme_type": [ - {"count": 5, "programme_type": 0, "programme_type_display": "Bilateral"}, - {"count": 7, "programme_type": 1, "programme_type_display": "Multilateral"}, - {"count": 4, "programme_type": 2, "programme_type_display": "Domestic"}, + {"count": 4, "programme_type": 0, "programme_type_display": "Bilateral"}, + {"count": 4, "programme_type": 1, "programme_type_display": "Multilateral"}, + {"count": 8, "programme_type": 2, "programme_type_display": "Domestic"}, + ], + "projects_per_secondary_sectors": [ + { + "count": 8, + "secondary_sectors": 1, + "secondary_sectors_display": "sect-tag-EDccPugTHOrVqLIKlyPyxLPeHqyoHzwwFYEMaGiCkoeGPrnjlk", + }, + { + "count": 8, + "secondary_sectors": 2, + "secondary_sectors_display": "sect-tag-MThQoAZvUhEREEnLkPAbpciKLkiOGcKjdkqlHzMKObUUQsfnCM", + }, + { + "count": 8, + "secondary_sectors": 3, + "secondary_sectors_display": "sect-tag-EkoAMjYLXlNQGqkURvDMLeoyyigbmHGRAjMglENMcYIGWhfEQi", + }, + { + "count": 8, + "secondary_sectors": 4, + "secondary_sectors_display": "sect-tag-IaXRPBHAxcSHBoZEYXywLZVWSKgBiqEXofsMIAqmaTVYaKHhHa", + }, ], - "projects_per_secondary_sectors": [], "projects_per_sector": [ {"count": 16, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} ], @@ -23,227 +44,31 @@ snapshots["TestProjectAPI::test_global_project_api 2"] = [ { - "budget_amount_total": 7890000, - "id": 5, - "iso3": "YvZ", - "name": "country-SZuAxgjBPLqqIBKxNrRzWnAJYJElxJJEqtKwXTzViQhVoCYSkg", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-JNSRTdkyOaZfjEMBfeqoxfMcUyzNPHsTMdXlOFCamQZHsmcYMG", - "target_total": 0, - }, - { - "budget_amount_total": 720000, - "id": 7, - "iso3": "kfs", - "name": "country-ZwjrVnVzStakFageXSAHAPsUBklxlTimFlGhCKnlmdVlZWmqAC", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-fyhrevbLpEFRWgadrWaQLYcgnHYayMHWrFEWvMBvxRvupxQzyN", - "target_total": 0, - }, - { - "budget_amount_total": 4740000, - "id": 9, - "iso3": "hWp", - "name": "country-FSBAdOgXrUUrqOGvAQqwfagTZFpLFoLBQrgXTFJMKyMHQycMgL", - "ongoing_projects": 1, - "operation_types": [0], - "operation_types_display": ["Programme"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-xLRTMAzTVcwPYCDKHczZOVXBQbnKlbOvgsAZbUDqwRwwprCYdu", - "target_total": 0, - }, - { - "budget_amount_total": 1510000, - "id": 11, - "iso3": "upQ", - "name": "country-jfwLeHpiSEbcdrzABgtvOLbWeYhdCLFQDhqcbVPqLpIXJeTKWS", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-TeuYlcqNMGcZLtPMFzYMHFOoPemDLCRhAyMJVsgAygjnFsdFEK", - "target_total": 0, - }, - { - "budget_amount_total": 2590000, - "id": 13, - "iso3": "DUn", - "name": "country-HMXjEmKAVfuMCBqXaumRPVuACdVEGMDFTvwqkBeLTbpYHqjlEn", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-ldTllPjEggWeDxPFBMhFgBkdXskNIxhsrJzKJocxlgBLanLZll", - "target_total": 0, - }, - { - "budget_amount_total": 4880000, - "id": 15, - "iso3": "Rap", - "name": "country-pUBMSvIcwbWUYtuZdxUcMlIrzDkUadDmrlWMWmKcSDCoVFjLur", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-JbeAivJwhwcRiSSOatvbQlJgtnvoeiDMqXRRRRooWFNWvmfZUU", - "target_total": 0, - }, - { - "budget_amount_total": 6060000, - "id": 17, - "iso3": "ZEZ", - "name": "country-SQTvZhsNCjqMSdmiiprEFesBYNvcLpTwuxwSCcjccAhEqemAtq", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-zhXkgJKpQMfOjERUWYaAubCVzgjkjIPpPTObxyssAJSwpQaqxx", - "target_total": 0, - }, - { - "budget_amount_total": 9860000, - "id": 19, - "iso3": "qzl", - "name": "country-ZMhpQyDQuMgAtrSOKhumYjUhJPbggmdHuingwzIXkpslIqTaUi", - "ongoing_projects": 1, - "operation_types": [0], - "operation_types_display": ["Programme"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-zEfOpXkaiupWqkpIBCZcCEybtXiNUmPOQQLWIFOTBTzEtdISFF", - "target_total": 0, - }, - { - "budget_amount_total": 720000, - "id": 21, - "iso3": "Eof", - "name": "country-cjVwtpezOoKeuGtArEivAdsyZDGkPcRnBNbzSguTYSwcQlzepq", - "ongoing_projects": 1, - "operation_types": [0], - "operation_types_display": ["Programme"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-ijYXRdTByCBzusPauoVOlrkOPhSAKrovoSkGVBeDJQaxJepHcv", - "target_total": 0, - }, - { - "budget_amount_total": 6410000, - "id": 23, - "iso3": "MrZ", - "name": "country-yMnkUJDOKRkTFsRYyXllzGRNEumfeVwkQqWYnIFiQbCuCMmUgt", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-YZhLTKyQruRKWWPylOqQmJraKTjXFCQewCoQOAHvaPCduRhIjw", - "target_total": 0, - }, - { - "budget_amount_total": 6200000, - "id": 25, - "iso3": "vac", - "name": "country-uelMHjMPVqwrWfGnmXFJHgtPFWTtjwbDZtoHicmMwRdPTZdCGB", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-XumVuEYOOyTdPozCnnyerlqErfwWfBVojNuBATePrGXYYSkSqP", - "target_total": 0, - }, - { - "budget_amount_total": 7950000, - "id": 27, - "iso3": "sma", - "name": "country-BkXnCGxSWCDgRDhleKLKmSPMYfFyUVEaQWFOaaikPCKBXkVrtv", - "ongoing_projects": 1, - "operation_types": [0], - "operation_types_display": ["Programme"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-SaoMIFGOWcAYsBvKtVMfQWIAIPUtMPGFSrMTmSlanULjkyJzGE", - "target_total": 0, - }, - { - "budget_amount_total": 1600000, - "id": 29, - "iso3": "nad", - "name": "country-saPeEKTeLtrSTvOxEBVyLWTyjwmACggFhVicotxSESrhOCvywZ", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-ilslioCfzytonQUmVZSwfZMNNCOVkeeeuiNkCWaYNRLnUdAZEB", - "target_total": 0, - }, - { - "budget_amount_total": 520000, - "id": 31, - "iso3": "yYU", - "name": "country-BdtUtdtjrgsjSRAuyjBezdqztpbUbCktDzySawXTnenNTEWHnD", - "ongoing_projects": 1, - "operation_types": [0], - "operation_types_display": ["Programme"], - "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} - ], - "society_name": "society-name-MYoFEUEYltXVlqkEGtYSelIQFOAXYgiWVGjBgkrTLNJDCMKMsQ", - "target_total": 0, - }, - { - "budget_amount_total": 4160000, - "id": 33, - "iso3": "XDR", - "name": "country-ajzWfByYHQquRdguYBVPikvZIqHhNWbAasvPVNIlTCJesEcvQV", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], + "budget_amount_total": 800000, + "id": 3, + "iso3": "Osx", + "name": "country-sKRWmlNOzBGufzQgliEupaqypCWrvtLUKaqPxSpdQhDtkzRGTX", + "ongoing_projects": 8, + "operation_types": [0, 1], + "operation_types_display": ["Programme", "Emergency Operation"], "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} + {"count": 8, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} ], - "society_name": "society-name-gEjLhkzKGguporwomItnbNOiAMDGGPmnhdTlXdGvSjcPxzqvNH", + "society_name": "society-name-NooiEjDVMxASJEWIZQnWpRWMYfHCHTxeKhdJGmKIjkuHChRnTL", "target_total": 0, }, { - "budget_amount_total": 1250000, - "id": 35, - "iso3": "tvr", - "name": "country-IHXBmvMsgjoaQYEwyWCtupDUFcMzqjixAnGXxeBbmhjeXNftqi", - "ongoing_projects": 1, - "operation_types": [1], - "operation_types_display": ["Emergency Operation"], + "budget_amount_total": 800000, + "id": 4, + "iso3": "ZRt", + "name": "country-fLgGiOzeLKdBQipsquZzSVuuCroemiXXLgjgkCDuAhIwXnCtDq", + "ongoing_projects": 8, + "operation_types": [0, 1], + "operation_types_display": ["Programme", "Emergency Operation"], "projects_per_sector": [ - {"count": 1, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} + {"count": 8, "primary_sector": 1, "primary_sector_display": "sect-zoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYx"} ], - "society_name": "society-name-dpiETrgvqBqljxxKiiFeNlOaEtrfQgsRHykMQTFGmiOGsumHhW", + "society_name": "society-name-TSMcnujfTpwzGdRtqlbzCJVJpgDgZYihadXoimzxROPfLLqebe", "target_total": 0, }, ] @@ -263,89 +88,19 @@ ,,,,,,,,,,,,False,,,10,,,,,,,,,,,True,True,,,,,,,,,,\r """ -snapshots["TestProjectAPI::test_project_create 1"] = { - "actual_expenditure": 0, - "annual_splits": [], - "budget_amount": 5790000, - "description": "", - "document": None, - "dtype": None, - "dtype_detail": None, - "end_date": "2008-01-01", - "event": None, - "event_detail": None, - "id": 1, - "modified_at": "2008-01-01T00:00:00.123456Z", - "modified_by": None, - "modified_by_detail": None, - "name": "Mock Project for Create API Test", - "operation_type": 0, - "operation_type_display": "Programme", - "primary_sector": 1, - "primary_sector_display": "sect-blDLTmDfquSPTYkTUhfhTCOxfHTyUYGNkyJycXkvKQjkjlXTdA", - "programme_type": 0, - "programme_type_display": "Bilateral", - "project_admin2": [], - "project_admin2_detail": [], - "project_country": 1, - "project_country_detail": { - "id": 1, - "iso": "fn", - "iso3": "CME", - "name": "country-rnjlkxMThQoAZvUhEREEnLkPAbpciKLkiOGcKjdkqlHzMKObUU", - "society_name": "society-name-EkoAMjYLXlNQGqkURvDMLeoyyigbmHGRAjMglENMcYIGWhfEQi", - }, - "project_districts": [1], - "project_districts_detail": [{"id": 1, "name": "district-DpBzXcMVyUuzNVKMIHPTYcHgCDcpHIzVcJyHWOdmsCztXsDkBs"}], - "reached_female": 0, - "reached_male": 0, - "reached_other": 0, - "reached_total": 0, - "regional_project": None, - "regional_project_detail": None, - "reporting_ns": 1, - "reporting_ns_contact_email": None, - "reporting_ns_contact_name": None, - "reporting_ns_contact_role": None, - "reporting_ns_detail": { - "id": 1, - "iso": "fn", - "iso3": "CME", - "name": "country-rnjlkxMThQoAZvUhEREEnLkPAbpciKLkiOGcKjdkqlHzMKObUU", - "society_name": "society-name-EkoAMjYLXlNQGqkURvDMLeoyyigbmHGRAjMglENMcYIGWhfEQi", - }, - "secondary_sectors": [1, 2], - "secondary_sectors_display": [ - "sect-tag-tUXCsOlhimaNWqaDFFIZaMFpnLQEDACfMMapJrNOJndljdPwcj", - "sect-tag-QKMtvfdgAlkRsNQSSMKYJlDVLxcfXtuxyeWBJesEihSrvHAHnS", - ], - "start_date": "2008-01-01", - "status": 1, - "status_display": "Ongoing", - "target_female": 0, - "target_male": 0, - "target_other": 0, - "target_total": 0, - "translation_module_original_language": "en", - "translation_module_skip_auto_translation": False, - "user": 5, - "visibility": "public", - "visibility_display": "Public", -} - snapshots[ "TestProjectAPI::test_project_csv_api 1" ] = """actual_expenditure,budget_amount,description,document,dtype,dtype_detail.id,dtype_detail.name,dtype_detail.summary,dtype_detail.translation_module_original_language,end_date,event,event_detail.dtype,event_detail.emergency_response_contact_email,event_detail.id,event_detail.name,event_detail.parent_event,event_detail.slug,event_detail.start_date,event_detail.translation_module_original_language,id,modified_at,modified_by,modified_by_detail,name,operation_type,operation_type_display,primary_sector,primary_sector_display,programme_type,programme_type_display,project_country,project_country_detail.id,project_country_detail.iso,project_country_detail.iso3,project_country_detail.name,project_country_detail.society_name,project_districts_detail.code,project_districts_detail.id,project_districts_detail.is_deprecated,project_districts_detail.is_enclave,project_districts_detail.name,reached_female,reached_male,reached_other,reached_total,regional_project,regional_project_detail.created_at,regional_project_detail.id,regional_project_detail.modified_at,regional_project_detail.name,regional_project_detail.translation_module_original_language,regional_project_detail.translation_module_skip_auto_translation,reporting_ns,reporting_ns_contact_email,reporting_ns_contact_name,reporting_ns_contact_role,reporting_ns_detail.id,reporting_ns_detail.iso,reporting_ns_detail.iso3,reporting_ns_detail.name,reporting_ns_detail.society_name,secondary_sectors,secondary_sectors_display,start_date,status,status_display,target_female,target_male,target_other,target_total,translation_module_original_language,translation_module_skip_auto_translation,user,visibility,visibility_display\r -0,3070000,,,3,3,disaster-type-zjivfEKVdJzqfzGBXSiWiEJmFzPKmJNVHpperXBuRKfhQABxwm,uwMPbXtkwNZCNjCcomRxjWUfhVdpNjsavSZhtCEbvnVInnIHWqJENUjSSQbyLQHcqkdsmYSNrdDPaeyQrQQxgbsPyoyGTguFMIflmGDJTbcpHtvFzVkbwRwwOtpGrZdOqybJrojvzQifUyHRNORoApKjBtMvCIinPiLIRZmitSTHiBXjPKkueJIUhlujUbWuAAtCVOVrjXmgilbWNNrMKNoMooRbwfSXEiGMETPxlyFEikmocAWarAoVQmWnelCNFSuDpBzXcMVyUuzNVKMIHPTYcHgCDcpHIzVcJyHWOdmsCztXsDkBsNdSHjDPCfUGhlXLSIizAuCblDLTmDfquSPTYkTUhfhTCOxfHTyUYGNkyJycXkvKQjkjlXTdAttUXCsOlhimaNWqaDFFIZaMFpnLQEDACfMMapJrNOJndljdPwcjcQKMtvfdgAlkRsNQSSMKYJlDVLxcfXtuxyeWBJesEihSrvHAHnSnNdgKUOHfEUSMYTsB,en,2008-01-01,2,1,,2,event-silUaSKzXKclMuZNoOKgFjvVepwukOfTQOUvCaqnpSewqYgUad,1,ycuakafywiygeykpwrokcezcsbuqgevkykuejfvmnetbbpkmbk,,en,1,2008-01-01T00:00:00.123456Z,,,project-MuqHKNwiNKFHUOFFZlNoTsmahbDOYhVnZNAAcvwJZOnaOmSsqY,1,Emergency Operation,1,sect-uVAlmiYIxHGrkqEZsVvZhDejWoRURzZJxfYzaqIhDxRVRqLyOx,0,Bilateral,3,3,gZ,UEW,country-mdryRMMcemZWLUQJnEnvtanmVhVWEpSMTnzpJuXsyDIPwtqxGF,society-name-unxuAcKoVjbqJLLUAsjmvoyKpFJPRvqWFUPVFDkUYwkiUIFlIP,"CefuMjeirN, QWBUdsMtwg","1, 2","False, True","False, True","district-hQbiawYYpLublqdiVAHhVeECXxGLgCGoNcUYQHtDPbdEzBRgFT, district-gYShPPXJUnBCoAvDzAUguBuQqxjREefffBgVVxZiJdLJJvQhAw",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-vREEZcPiEjODIvDYAVdHtKURuJIbnKRvZYwejrbvyOIkKMylMh,en,False,2,,,,2,Mf,djk,country-WrKoZBJXNNRPJbMQSrblrSWtvwaljKQzejVObfVHnyADvkxtUu,society-name-WNdRfrCQBFMCArnWGhwBhsRRLFHQtcozMdantnXiWqsuhaFVBl,"1, 2","sect-tag-RoEbNJuNoPeODStPAhicctFhgpIiyDxQVSIALVUjAPgFNArcSx, sect-tag-CCpxgRxIPwdzrmhDfQnPOMbdYvpiYKneWJnLnovXjYMarjiIqZ",2008-01-01,1,Ongoing,0,0,0,0,en,False,5,public,Public\r -0,7190000,,,6,6,disaster-type-xVZxVXLHMxpPrnLyfgiOVMhcLPmmTCgeINvtUEWmIUjcimAJTq,WJwxCOThBeEAHGYbkMrSiscKdYSmVzFRIGekCWGyJXyzMrnlakKnLSaYGDGTUHqtosTrJhkocIpscOjrirYdPpnIhaPwOMxufTJqUiANsudOawoUrlqbIQXXLgUVSyPqOOMJnCournLOZWzjCoUUBxjEfFlDllmKFUlPsbtklzRMmejeBpDPzgUHiUWZaMgyybhaWPcipXfrjOMaYaYgIVvTfmiEWKCktvEjpdISrOIhbcgIsgGAjaoboByjwPsoRyRThFkhogsweNvhxfcMjlBHvMlRBjQRtNswgrFQxqZTZeYajXPjujyCUYYEehKBUrjfuilXywuFBESAMYOviZPpyAJFIIFIIoyfLTAHKXSZVoSfpxanbxJEihdwxXisDjJApnodVihSTjyUbSBxdSgQLeEMkbjxjfpeaKAjWlEViVHStEAUvCYPSashjdPcMWlGkazBRDJTqKGtToBkrfHyiVnzNdozlVJMeSDEuPPzykdZxPBm,en,2008-01-01,4,4,,4,event-fvuzXkBdzWcQPjKdOTZQHsAzRSJtUVuwarHNjSzCPnINYNPCSw,3,zypzxmtfcivyuuvihisnfgjthvwokbbyilqpxtubghudxqogwh,,en,2,2008-01-01T00:00:00.123456Z,,,project-rggexMXvbpskIgenMaWtmJmOcprfKKcKYEcduftawWszGmuWzU,0,Programme,1,sect-uVAlmiYIxHGrkqEZsVvZhDejWoRURzZJxfYzaqIhDxRVRqLyOx,1,Multilateral,5,5,gI,Lwj,country-REShxGUKbqkLdjuDSiwkdrxAOwdssHOeGmXOlWgMWkIuuRZtrR,society-name-aiHsxXFAvkgnjGomYJNSHITJSWZhADehibEwtSxiCMHWvlTtbV,"CefuMjeirN, QWBUdsMtwg","1, 2","False, True","False, True","district-hQbiawYYpLublqdiVAHhVeECXxGLgCGoNcUYQHtDPbdEzBRgFT, district-gYShPPXJUnBCoAvDzAUguBuQqxjREefffBgVVxZiJdLJJvQhAw",0,0,0,0,2,2008-01-01T00:00:00.123456Z,2,2008-01-01T00:00:00.123456Z,regional-project-kjRDfOfTonZRPjXTkGHUMPHXvCYivsxNBcTXRypnNMejKOFgZa,en,False,4,,,,4,at,cRM,country-uTcrAfFpxCtnHtlhxYcXmfCGbZEGjmvEUHtXujXgHRinUcDyTH,society-name-fvDcgHXQVtbKWtOnummsrIuXCQhrjkrhaNJGgnIwJurjTZsKpk,"1, 2","sect-tag-RoEbNJuNoPeODStPAhicctFhgpIiyDxQVSIALVUjAPgFNArcSx, sect-tag-CCpxgRxIPwdzrmhDfQnPOMbdYvpiYKneWJnLnovXjYMarjiIqZ",2008-01-01,1,Ongoing,0,0,0,0,en,False,6,public,Public\r -0,9720000,,,9,9,disaster-type-hYQmOusTYYfwMZFbNLAkxqmGrHbFukdPpStqCBvcrVWQDQfvJc,iNaVKbtymEyycSRrSyvxZGYBATviwUqJmFsrfCQfZQuGhbZiZWgpelxejKZpXfeaUaVZvNejLODOvYQgNhdTimVflfTfaBYRondTfyuOHmEmTFMTlEsURLdClGaflmqjIKmShSWemluWokzOLsMAGOsnBqwVpHaPRqsWkedeFwUdNWBfRWTCaVRfuLXxSRMReKqUuCwVZExFtWFuIVmoLkcSwADDuYzDDCjjVWyAbiYuyOjzxaBYQljLlngbzEjrvmbFzktJromFMUFBBkFQdwgeuTEMsjpHFZnAFatOkvOtRNBNhMiHsvUxZSixKEebCxApnuSouOEYrJvKYvSmiuYOKoTLNppFKEbuGgyWjNufHFDMUreCyXmYXrTjxXdEpoOauwNEJjYruFuMImZPmMMhsUdVmHZGspYyBSatqnjsbbPPWAfxDXjCOyJkMCWugrDrmTMDskLiubhduJExjuUyJbOBPuzluNWcPsuKWKcGdUTTiFee,en,2008-01-01,6,7,,6,event-nDqchHQOlEiDLuxKyQLcuSgOwakAEvvPglwtkDIlWbCZNDLKSB,5,uzepquxmverztcowggabxrkzlbkgktmshmkwiiqvydftyxjzwd,,en,3,2008-01-01T00:00:00.123456Z,,,project-ijgHkTpfWxwvfAvWeFzIdHAPYzSjJfnCkhWqopdPRJbdPSoEcc,0,Programme,1,sect-uVAlmiYIxHGrkqEZsVvZhDejWoRURzZJxfYzaqIhDxRVRqLyOx,0,Bilateral,7,7,we,AMV,country-osqyTwekseIKpHNGtzNdIShLEqPbcvAqmvWdinJUvWQdpFeZKN,society-name-NfJEirUcgcFGoPwBEtYobdbXYZmIMyRRVbJEdyXySiBSBJihCh,"CefuMjeirN, QWBUdsMtwg","1, 2","False, True","False, True","district-hQbiawYYpLublqdiVAHhVeECXxGLgCGoNcUYQHtDPbdEzBRgFT, district-gYShPPXJUnBCoAvDzAUguBuQqxjREefffBgVVxZiJdLJJvQhAw",0,0,0,0,3,2008-01-01T00:00:00.123456Z,3,2008-01-01T00:00:00.123456Z,regional-project-QTSAJecmLcnoLFawSfLxGkznjIaOVNsrJxGykmWMqvmuqzhPsC,en,False,6,,,,6,Rc,NPd,country-ZYfFgDukskerKxwfelTXDqEqWCPihKFcxszANRiCxGNuxfRAGC,society-name-VYpSJajgsykKzeoyDQfwDDPIDgflUgzXBmzveuvMFnSVEhrDcI,"1, 2","sect-tag-RoEbNJuNoPeODStPAhicctFhgpIiyDxQVSIALVUjAPgFNArcSx, sect-tag-CCpxgRxIPwdzrmhDfQnPOMbdYvpiYKneWJnLnovXjYMarjiIqZ",2008-01-01,1,Ongoing,0,0,0,0,en,False,7,public,Public\r -0,8800000,,,12,12,disaster-type-abeSHyDByhcbGOMQJZRETyhaJfsmxyYfsdUpJsuPpPfLGWdYEr,AYWXJPimutALuRYgcamUXbDWzlaxrvVLyCevbScBBQyBrfeaPzxtfTfTosaZCIugzNLrXNEcHNaxXJWmBAJmsJjyIUKKNzkyMDYaHoIBJJHOKhEHRQPFYNexbxZLBlxDeKDybSMpibfiBSWwDOHKJlyatfJaWKxieYDxvGuhDFDsTfQViFsyMlYegIRZPJjrfMTLziBrlkjMEvGLeCdZTqUUxrigJwRsxFcuBXGiaKjixFaTKbUdeOzoTvArdDknirElGkJNuUYradfFHPHlkSqTCpfiAeyIYXxaEedYwJPSWdfhKxaNlDZgQfulBfVcVxoYCdKimccDeZBLuRaaEqSPfGKYtJTuSsoZPjZKHDALJKnAwiMqrEXhAUfNYUGjEmZtZIfnXUXecqvcjwXJQNzoRleDsnYYUxCqHWpvjAHdzrIBcVBCmLJoTqtIGmJtluZoyZOtziIdvvdCCrTdzxCNvwfxzknKlUaMcIvXugcFOStUbQMg,en,2008-01-01,8,10,,8,event-XbcmdHnxyzMfWbyjRDeuVnglXnqvwdBGJlBKgFOFBWJPjNnHqs,7,vchptjayhcxmvtpeqjvhiacnopxnuhdgqxcssbmdgxkltezssk,,en,4,2008-01-01T00:00:00.123456Z,,,project-ogfgDXGygMRbjvZsTCRydRSlkObzTNxourSfRlafQilCuYYKwd,0,Programme,1,sect-uVAlmiYIxHGrkqEZsVvZhDejWoRURzZJxfYzaqIhDxRVRqLyOx,0,Bilateral,9,9,YT,uCi,country-fdLhjgCijUesXvSuLpTEBAhPQQJULtTnEPcxkzmwedcZqylFDQ,society-name-uVTBQuWKSlaYkqAfFvjcipGMFrmUlAcXaOxTvZNxvagEXGmnjv,"CefuMjeirN, QWBUdsMtwg","1, 2","False, True","False, True","district-hQbiawYYpLublqdiVAHhVeECXxGLgCGoNcUYQHtDPbdEzBRgFT, district-gYShPPXJUnBCoAvDzAUguBuQqxjREefffBgVVxZiJdLJJvQhAw",0,0,0,0,4,2008-01-01T00:00:00.123456Z,4,2008-01-01T00:00:00.123456Z,regional-project-ZPRRLqCONvcCscFgWCTmiDMJdwTVLRxPboQWedazsRNntXUanS,en,False,8,,,,8,Ms,YQp,country-znlhcyZgVnmWKVVtSRnLtxDdPOoKqnGbtanlvnFUyUuDzMWkFE,society-name-eNgabNdaratCyUKkgdxnPmBVxerAPbtXchtjqDZnhOVRYbElah,"1, 2","sect-tag-RoEbNJuNoPeODStPAhicctFhgpIiyDxQVSIALVUjAPgFNArcSx, sect-tag-CCpxgRxIPwdzrmhDfQnPOMbdYvpiYKneWJnLnovXjYMarjiIqZ",2008-01-01,1,Ongoing,0,0,0,0,en,False,8,public,Public\r -0,5310000,,,15,15,disaster-type-NbXGCGPGBvnGWvRMZcyEWnKAntRkSGSNGWEzbVuZOubQOtKiih,SDdqPJBWSWeIzRUCbAznldWezWkKRaEmZLLlXGNfRKIkFhJjASuXnXZoDfDVaIBtNqkzLskbnTSLIRQpfRXputROMSbhswXKNACbyMleNvICmaxqMHkroJGVXrQYpZdSjYSRVeDUIhAEGayOyPrQoRhvPHLWWdgyPqXLUQjPGfvamCXchEdMjAOtcCdnbGOIcHOeDkzjHkMAJlPXstHuWbQbDjHGQLvKlPPDOrfeAIaBLRhUMyhkZEzziaJcHibpNhDdOWZlAmRqrrnuZMyOPlPqvHRFaflaVVsZQQjtkQxnAMbLfjoDxpalJrKCzTdpNyPWCaiWspyuiWStcwwoSWBqGWfSICYxXrRbpzSrGIjhwTKCFpHxrTzAjmioBcyzZDMXNHAsLeixLtKFQliVdqlMHylkAKNiayAzeDKLAlmwyNLMQjLVMYUJpnuWJVEzJGDTFCNlxXBathpqHldHZqMpgumMHVmWMfjizabaestdPQSDzjNU,en,2008-01-01,10,13,,10,event-rvKabVYNQUKOkgCDKdxujJBBLnoYxfOQuVGIWbWUDVaXQumiRz,9,bvvhhkpylfapiiketipuwhpubckdshuizggthcsuditntdnzev,,en,5,2008-01-01T00:00:00.123456Z,,,project-VeYtVPQocsUKenthbnHZKFujOIEicLNIBPuQytkVYQSisavNTP,0,Programme,1,sect-uVAlmiYIxHGrkqEZsVvZhDejWoRURzZJxfYzaqIhDxRVRqLyOx,0,Bilateral,11,11,Kr,yWL,country-eoIJxdnslmAkQVicpmtDslqAnPgbtoQCTLAGVSRZQzYIbcJYPu,society-name-djZPfPQFCseDqmctnudjoIYYxdkkJNrBzvlCWvUWWkmmiHjNYo,"CefuMjeirN, QWBUdsMtwg","1, 2","False, True","False, True","district-hQbiawYYpLublqdiVAHhVeECXxGLgCGoNcUYQHtDPbdEzBRgFT, district-gYShPPXJUnBCoAvDzAUguBuQqxjREefffBgVVxZiJdLJJvQhAw",0,0,0,0,5,2008-01-01T00:00:00.123456Z,5,2008-01-01T00:00:00.123456Z,regional-project-JNziKXIcPxzIiafEQxpOaCNAAgHBKvEjWWPUPXsatpYtFqhTku,en,False,10,,,,10,de,IyT,country-icnBcGNSWseeItONgoPvNNlIwwWWpxRKvjcxyecdAFKKaPbzKB,society-name-CEqcXSpEGrSRiTnQmKstLSxobazFDyWkvuankOwaeFnyuqizls,"1, 2","sect-tag-RoEbNJuNoPeODStPAhicctFhgpIiyDxQVSIALVUjAPgFNArcSx, sect-tag-CCpxgRxIPwdzrmhDfQnPOMbdYvpiYKneWJnLnovXjYMarjiIqZ",2008-01-01,1,Ongoing,0,0,0,0,en,False,9,public,Public\r -0,6900000,,,18,18,disaster-type-chSIzoKMqwqgnUXJquoguynXdMpaXZEMzHQVvXNcPLBSQtxYLI,DiOrUcJVNMlSgDEOXmvPWfAzGeennNEmBCbESihEQoTsaTltiPkPkVrgSNHYUoZZdARplUpButagIgPYtsrksWJrjQQbkSrpZWxaSMtCAwSfhQVGBQevAraNZKsgtFwmNINTemDcutOitufRONdGlyeQXebPmuyuNrlVKLlcOlpEyTyBLQBMlXkKwooIyfKqfeOIYWmMRbNYoYYtirPOjsayBRlGVmrAmmZtRHIMopqnExgVHyBNqUcGBXZxZslspUJlyNiJvvbCrnvbKwkWJOHZNxMrEOapKBZMBsunuMgEzvcqDhZJHmacWLZLvriJGDnrsVUNPzQyHBBCLINLqDbASgDSPbBLdfqNCffbWnZHqYTCgvzEwABUuaPveIUGBbRgyFQsqKURlnsSnxNOBKHubruWbPvYAATKYoFvtciTVqlYJBeESILkvZChtcivdRpIuTFBVlWytGYeOAWWpHPsKpWVAJdQymuGwobUfbXfWjCJKyMv,en,2008-01-01,12,16,,12,event-NobyoWwFJPTbRoDJLXhQjgoQNUTCqpUzMKauvJuwFYxLKtSXbI,11,wrlkvaambkodstwjhmzibayeudyvadpocwrxccfzujcafoaqje,,en,6,2008-01-01T00:00:00.123456Z,,,project-fZNPnaWsPGxjTFDwHyWEdnyuAjdmVBnqtRsnOMqzGXMyVVTpog,0,Programme,1,sect-uVAlmiYIxHGrkqEZsVvZhDejWoRURzZJxfYzaqIhDxRVRqLyOx,2,Domestic,13,13,cA,FuD,country-IHPyPYWgGXiZbPFazyTWMchdDLioEXjLJjyJMoorTGQBQtMDcp,society-name-GNAHYUomvwSCaZFCpVgXkZQnguvvOcRXuCRcwiPfHENMRVoHrT,"CefuMjeirN, QWBUdsMtwg","1, 2","False, True","False, True","district-hQbiawYYpLublqdiVAHhVeECXxGLgCGoNcUYQHtDPbdEzBRgFT, district-gYShPPXJUnBCoAvDzAUguBuQqxjREefffBgVVxZiJdLJJvQhAw",0,0,0,0,6,2008-01-01T00:00:00.123456Z,6,2008-01-01T00:00:00.123456Z,regional-project-ohCtrwDDBlRAiypzCIuScGNJMFFqYFXxNrRsPpsGTviLwmCVDY,en,False,12,,,,12,JM,aXr,country-uzgadFFFmPkeFwdoAfWKWQlcjSvNVLMUeLmHEmnDcmtUlZstrC,society-name-FBbCVIAiXoueaSEAueXWMeYEOcSJXwfESpQkILwfrwymqcMeJY,"1, 2","sect-tag-RoEbNJuNoPeODStPAhicctFhgpIiyDxQVSIALVUjAPgFNArcSx, sect-tag-CCpxgRxIPwdzrmhDfQnPOMbdYvpiYKneWJnLnovXjYMarjiIqZ",2008-01-01,1,Ongoing,0,0,0,0,en,False,10,public,Public\r -0,3550000,,,21,21,disaster-type-YUWknVkbnByHBsiYCVEIyiBISQXvlEjHDVybUpjaGECJorCfVa,AlQIoorOOwWWOTxEpvBlmPiZCFPTXcdqvnvHwTLEndiXDoVOQikJwZCbtTkYqcWUjvvvsAHMUYSRoLYCDPcsggAEJIexYLAOYszPDoHzYvyMatrGQqVQBFVonlTlNeSksIMvwIDSCbaQBkpRNquLLRrkArcFAbOJMundfiTdopKGbShpUGFfWyjIopwBJNduJXecIRbhxnnDrZmuzDbiOPCFkGXDeuyxMBQNxDSLQswFvKvNKxxbvuPpSOyiKTOfChtGxseJoNwkSuiVQxjZdDQXHPGkXWezPugeNOTlftxFsTsujdZncYZQiEOyWNqDmbGUXJjtdmUxRplUfYkVssaVSlLmXBosPYYbKqflZTfJcxTQkwEKuLKdTbsEMqfiZPpjutAafJMfYhnZtVUoqZGTxEemnMXRNBSlDBIAflFpsihXhjbXkNfSTnGfocfsLtJckNHMdJIPHTeLyRAtZxkmhKgRKLcGjeQnmuzJUSngCjoWBOzF,en,2008-01-01,14,19,,14,event-TXbIodXzMCHWMLOKxgPqwsMJnADfqyEqKcByHGUACxeJvWFgfB,13,twbcwqmyxzntpwfgdopcnljbuciwhwbvwynpxeteeypbrmgyfs,,en,7,2008-01-01T00:00:00.123456Z,,,project-dtTSeEfaPnSJKfNhGYWEscubhpUnYkbWprZqLxBbFeqHEXzwdT,1,Emergency Operation,1,sect-uVAlmiYIxHGrkqEZsVvZhDejWoRURzZJxfYzaqIhDxRVRqLyOx,1,Multilateral,15,15,CU,BGt,country-zWWuCqOOryxSnlxRursehHgZXSIQWSvfnyCmGbRvjdnJPPIgSL,society-name-XgIXrFfqyQikbeqQHpmpurdghlCkInyamaGEXzsDEcUKaAQQEB,"CefuMjeirN, QWBUdsMtwg","1, 2","False, True","False, True","district-hQbiawYYpLublqdiVAHhVeECXxGLgCGoNcUYQHtDPbdEzBRgFT, district-gYShPPXJUnBCoAvDzAUguBuQqxjREefffBgVVxZiJdLJJvQhAw",0,0,0,0,7,2008-01-01T00:00:00.123456Z,7,2008-01-01T00:00:00.123456Z,regional-project-bmQFPGUefPQVXduXSWCbmWKNyXndBzDbawMMrzMzzRMpTiXpnS,en,False,14,,,,14,UG,jpV,country-pEyDAJEsbqjbEADwftMCwmtfeuWEXnPXndNLdYcPTcKrVcYAxz,society-name-sUqvpHZvPQBxpvlmRiABcORQWacqDbKVfedVptLWQxAefMSWMG,"1, 2","sect-tag-RoEbNJuNoPeODStPAhicctFhgpIiyDxQVSIALVUjAPgFNArcSx, sect-tag-CCpxgRxIPwdzrmhDfQnPOMbdYvpiYKneWJnLnovXjYMarjiIqZ",2008-01-01,1,Ongoing,0,0,0,0,en,False,11,public,Public\r -0,4040000,,,24,24,disaster-type-grNLQtclZmimwJxLowGdSnQVOvPkGHbvbZFucFTQGfLROCZnxq,YYsiwlrTSEFFEqsXrKyqYLpctBsZddBayKIGiytIBiVQDxZxZnFDLoYJwPsPZybLgihbqbDkxqZwUmMBcfWBdKNojOVqDbCKjzixQYgTEsmhRzXdnixdPoVRSXLtpROMGHqrjDJKwjRpBfYFLqKAUqvZtMSVwTNwDUGhlCUmUgFTsRUQZjCUgHoijRrbknMnzQiEygDArTbXQrcrUyvQxgfkJyoGfhbwaiTZiITMkcEXPsROvLwkYHTiCXAFEYrlnNnuSqnWoODmUYiTCHnMAXVLlfwhcaiyaFCWkeqmOOqSHyKQYyYvnFexwEphbwlaJKJmeJDobQZKxdENnoDCogiNEmrfVtHvdXkRSDQxMOSbHjAITbaMdEjlbJPOEfkWhHLWrwlpMPSuKAXcipneuZNXNHUDwhDxCYNbmkmaJHIdYBaMseDvakYUrhobdCGOIBFPwHSYFuvRIvaLvKWgtvcsNClpzANsRziClGBvgIhsXSictYoP,en,2008-01-01,16,22,,16,event-yHiZdtHhYScKpdwtHsTCnHwCWFMCnLZHVjrTvORupHgxfIkFjR,15,mwgibrilwggvlxxpdraxhyhqufvvlcpdghkbuunvtqvgdygrzv,,en,8,2008-01-01T00:00:00.123456Z,,,project-JrWQucRSqzjgFyqQmsMmKsgBYTWyCqcCJRJRSAKGVSxIuCrNeW,0,Programme,1,sect-uVAlmiYIxHGrkqEZsVvZhDejWoRURzZJxfYzaqIhDxRVRqLyOx,0,Bilateral,17,17,hY,sQv,country-dyLxeBuFRfkhhJBdPeIfhQUiQTPXoRNMomdluwLVGXFLUidBYj,society-name-MBJQSGSMgbLTyOgKWzJdswbwkfejWdnYBaHhzYrXgSJXaqqVYZ,"CefuMjeirN, QWBUdsMtwg","1, 2","False, True","False, True","district-hQbiawYYpLublqdiVAHhVeECXxGLgCGoNcUYQHtDPbdEzBRgFT, district-gYShPPXJUnBCoAvDzAUguBuQqxjREefffBgVVxZiJdLJJvQhAw",0,0,0,0,8,2008-01-01T00:00:00.123456Z,8,2008-01-01T00:00:00.123456Z,regional-project-nDEdekrKnhBVrwRQMHjqpCIarCascEOLmyweZGCxzYLlBSLiWd,en,False,16,,,,16,IS,jRx,country-RuHaYbLFerPdJAmplntnbZWzvIXFssSISHJmNPkpDvMUaKFljH,society-name-JvVrwuhnNXhKAYbntHkXWpBFIJnJTFmzKOmjpIbcqSpAqCxHtA,"1, 2","sect-tag-RoEbNJuNoPeODStPAhicctFhgpIiyDxQVSIALVUjAPgFNArcSx, sect-tag-CCpxgRxIPwdzrmhDfQnPOMbdYvpiYKneWJnLnovXjYMarjiIqZ",2008-01-01,1,Ongoing,0,0,0,0,en,False,12,public,Public\r -0,3440000,,,27,27,disaster-type-jYVfDhWksXoxyBGQZpYVdnjwWmyKxTjxuICUVyFnuUaEJWfVdQ,FlHSoPMtZDyrUAVRelRyfqNSOYMnQzQpgXKzlCvzStqoLWcLueOMvzznbdPzmyjThYdwReyqdCGDVZTPdtGgfnVPxWWmSUEVOQOpMAxkEOkWZMuLVIzCDESdvxtHLLTXcEflSLMyMWMgusTJlEadQiKpnXSgnizGKmEqAbkepBWIIsexFEfSiVMeHrlSOPxeULwYAWfEBQxvJMkjoSxxiSIuJFQbBmaYQjXjJXTlMoZpwjICHNFgxUmwZMPAtFkAHQtVFrArRxucDRjHpgWahJwURdHIdIEuzVtwWbVRvIhPauHagaJPJRAFMFZqqFBfLnCIZXUJBymyYOsyWvpootCCrVKAomEKjjYSBkGhNewalnFsnJOFpsudukhMsauOaqEiWAbNEPKBkMerwLFCpAybKIWVuLhMJfCWtFUoyBxnNCPHHwHCZtGVMRRwPxChphZONIqqqYUMyeBpKulvEqEEErpCOkfjoGrGDCxyeYNfJWKHEvxF,en,2008-01-01,18,25,,18,event-mjTqVviSCSvACgLOvdZYUpdxzGDJdDYeiSXzvjsNsYIMeGwkZU,17,mgpggkateuhrldcfarkfpzufawcawigkitzwygkpuqrtkqbikt,,en,9,2008-01-01T00:00:00.123456Z,,,project-LQIoiUlMcOXbduLauswVhCoyuJxscuUKeKortlsAiQVEgimNop,1,Emergency Operation,1,sect-uVAlmiYIxHGrkqEZsVvZhDejWoRURzZJxfYzaqIhDxRVRqLyOx,0,Bilateral,19,19,Dd,Qzr,country-MCpUiJlKbhSJpiaxgfWkemqbBmyIbeNMcxbltczueeREOTrEZe,society-name-IwZCKBGJzmOQfkYYqdCVQMbtOtIRfpIQHhKdhgWrvSAFYSzDCA,"CefuMjeirN, QWBUdsMtwg","1, 2","False, True","False, True","district-hQbiawYYpLublqdiVAHhVeECXxGLgCGoNcUYQHtDPbdEzBRgFT, district-gYShPPXJUnBCoAvDzAUguBuQqxjREefffBgVVxZiJdLJJvQhAw",0,0,0,0,9,2008-01-01T00:00:00.123456Z,9,2008-01-01T00:00:00.123456Z,regional-project-GlUThMzaHFJFWOuOEGPJjXSYEmDBpdLEDoLPGUpByAbKFQKFGZ,en,False,18,,,,18,cS,nbm,country-EnvXFhjxyElejpabJXvDQGKwYLhxojTtlvXyybaLIYUavFZInA,society-name-repOzvPmiLGuBUIrNRMCUZCbVFZcBcbFrygrYppCcdYrULfUQF,"1, 2","sect-tag-RoEbNJuNoPeODStPAhicctFhgpIiyDxQVSIALVUjAPgFNArcSx, sect-tag-CCpxgRxIPwdzrmhDfQnPOMbdYvpiYKneWJnLnovXjYMarjiIqZ",2008-01-01,1,Ongoing,0,0,0,0,en,False,13,public,Public\r -0,8280000,,,30,30,disaster-type-TYqlhJhJWceZHVErDkMfTSoghkywNSCtyandiRngieFHhCYWbt,lTpiFuHIJffIuNZkbAnbqhywiDkzfJKgaKwogcbeDMQlWueozOkjmIPbenQCclbKPJfMtaeWryNyfTpzcDFjFkcOVsxdSTKJaBVnSRwopnxbhzTlAiuectKryhFpcxQeZUvgnoQibLzCmdLYjsaEtfOmvKORAAvppKdoYyoQHxErmoMgLuGbSabYJtgzjRyFxcfTtBHpPhrzxaYboKqXOxxGTRUTsyVsPkdgGgWPMbinkagywgMHJMazVbMhFXwcDvhVLkyDEOwZbrzgzPkQjROGOsmUMRBwBIVOJWOFYkajaqJFfboyYRvosFyWsfqsYjUTVEhRLCsvnesxLxwaJddjONbBULwtEmuBqiZCSiLqnAOfcYNbKHkqudPHhqTBQtCcjmAaCshFdYBaklxkvumQQfmqVfCAllIbKwteFxrRcgypCNcwXJrJkJhCmNnnWNVzNOgbWWIkZLBPQwBgiZdYysyrUAEyqDJwykvdJqwdVRePtpYK,en,2008-01-01,20,28,,20,event-aaAenHyvrSLBzdkPufrpvIUcrEfeJTbYctvdfuVpeThKuNOAdj,19,ezmxmzsrywffmbaduqgvyjuewarkltzqwdylqqvsgawhxuwfvq,,en,10,2008-01-01T00:00:00.123456Z,,,project-LKjwDaLLkGBhajHwOvWgqpHRjuRvjaplRUIWAvKhIWhKYHcXwl,0,Programme,1,sect-uVAlmiYIxHGrkqEZsVvZhDejWoRURzZJxfYzaqIhDxRVRqLyOx,2,Domestic,21,21,Hu,NzJ,country-uOrOsFtFpprSoxPPMEpBWMEcgQBGXxjxpeQZSEZudqaYKnEbfV,society-name-KSCrPbVNwkKbuUYQwcMwEKjGeHrCUjyzGdznVMMOlseBOgfMwr,"CefuMjeirN, QWBUdsMtwg","1, 2","False, True","False, True","district-hQbiawYYpLublqdiVAHhVeECXxGLgCGoNcUYQHtDPbdEzBRgFT, district-gYShPPXJUnBCoAvDzAUguBuQqxjREefffBgVVxZiJdLJJvQhAw",0,0,0,0,10,2008-01-01T00:00:00.123456Z,10,2008-01-01T00:00:00.123456Z,regional-project-oJHsbgVBOEDYzLjSSeLPhVbvaFgLDcMwFsWtwTrbBLhtpGDZBE,en,False,20,,,,20,DC,unL,country-dRPsrxQcCTiMzkNUXVbRfbCNoTlSjzwjCHkwsypbvNtQfVwBFh,society-name-JXUYCkrZOuJfTLYJDQcGQGtaFvTuWmSJZaxmVzvNOEjBHnNxcX,"1, 2","sect-tag-RoEbNJuNoPeODStPAhicctFhgpIiyDxQVSIALVUjAPgFNArcSx, sect-tag-CCpxgRxIPwdzrmhDfQnPOMbdYvpiYKneWJnLnovXjYMarjiIqZ",2008-01-01,1,Ongoing,0,0,0,0,en,False,14,public,Public\r +0,100000,,,1,1,disaster-type-1,summary,en,2008-01-01,2,1,,2,rpo: disaster-type-1 - 01-2008 - event-1,1,iqzlhqbiawyyplublqdivahhveecxxglgcgoncuyqhtdpbdezb,,en,1,2008-01-01T00:00:00.123456Z,,,project-hbvPgRZkVpHlJkvJBDoZzOllOQBzbVNmCLByaTnnrWTZYeKgZI,1,Emergency Operation,1,sect-1,0,Bilateral,1,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"ctFhgpIiyD, lmiYIxHGrk","2, 1","False, False","False, False","district-DejWoRURzZJxfYzaqIhDxRVRqLyOxgRoEbNJuNoPeODStPAhic, district-bQzraKRXVdMVFsXZoMZwoOmNqRWUXQRiOgOPctYCcLxUifsuVA",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-1,en,False,1,,,,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"1, 2","sec-tag-1, sec-tag-2",2008-01-01,1,Ongoing,0,0,0,0,en,False,5,public,Public\r +0,100000,,,1,1,disaster-type-1,summary,en,2008-01-01,2,1,,2,rpo: disaster-type-1 - 01-2008 - event-1,1,iqzlhqbiawyyplublqdivahhveecxxglgcgoncuyqhtdpbdezb,,en,2,2008-01-01T00:00:00.123456Z,,,project-NzLhwwDNlRTZtNLfRiuhpthlxSjGyAMiKyBlFOISPlJkFsiluC,1,Emergency Operation,1,sect-1,0,Bilateral,1,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"ctFhgpIiyD, lmiYIxHGrk","2, 1","False, False","False, False","district-DejWoRURzZJxfYzaqIhDxRVRqLyOxgRoEbNJuNoPeODStPAhic, district-bQzraKRXVdMVFsXZoMZwoOmNqRWUXQRiOgOPctYCcLxUifsuVA",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-1,en,False,1,,,,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"1, 2","sec-tag-1, sec-tag-2",2008-01-01,1,Ongoing,0,0,0,0,en,False,6,public,Public\r +0,100000,,,1,1,disaster-type-1,summary,en,2008-01-01,2,1,,2,rpo: disaster-type-1 - 01-2008 - event-1,1,iqzlhqbiawyyplublqdivahhveecxxglgcgoncuyqhtdpbdezb,,en,3,2008-01-01T00:00:00.123456Z,,,project-ATCFkfKbYWoscroIskXDKVXXFJGhKhrXIxIWcWUCInBgVPWptc,1,Emergency Operation,1,sect-1,0,Bilateral,1,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"ctFhgpIiyD, lmiYIxHGrk","2, 1","False, False","False, False","district-DejWoRURzZJxfYzaqIhDxRVRqLyOxgRoEbNJuNoPeODStPAhic, district-bQzraKRXVdMVFsXZoMZwoOmNqRWUXQRiOgOPctYCcLxUifsuVA",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-1,en,False,1,,,,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"1, 2","sec-tag-1, sec-tag-2",2008-01-01,1,Ongoing,0,0,0,0,en,False,7,public,Public\r +0,100000,,,1,1,disaster-type-1,summary,en,2008-01-01,2,1,,2,rpo: disaster-type-1 - 01-2008 - event-1,1,iqzlhqbiawyyplublqdivahhveecxxglgcgoncuyqhtdpbdezb,,en,4,2008-01-01T00:00:00.123456Z,,,project-NOBkNiYnnZdKwIrMIkuTssKrGRgiWYAdrPiSipjTupWRzFjKOr,1,Emergency Operation,1,sect-1,0,Bilateral,1,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"ctFhgpIiyD, lmiYIxHGrk","2, 1","False, False","False, False","district-DejWoRURzZJxfYzaqIhDxRVRqLyOxgRoEbNJuNoPeODStPAhic, district-bQzraKRXVdMVFsXZoMZwoOmNqRWUXQRiOgOPctYCcLxUifsuVA",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-1,en,False,1,,,,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"1, 2","sec-tag-1, sec-tag-2",2008-01-01,1,Ongoing,0,0,0,0,en,False,8,public,Public\r +0,100000,,,1,1,disaster-type-1,summary,en,2008-01-01,2,1,,2,rpo: disaster-type-1 - 01-2008 - event-1,1,iqzlhqbiawyyplublqdivahhveecxxglgcgoncuyqhtdpbdezb,,en,5,2008-01-01T00:00:00.123456Z,,,project-uLaXUfUDOQSweYIznBnFrusvJKiKFYvRWdcgOYDbhkCDaBmSiP,1,Emergency Operation,1,sect-1,0,Bilateral,1,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"ctFhgpIiyD, lmiYIxHGrk","2, 1","False, False","False, False","district-DejWoRURzZJxfYzaqIhDxRVRqLyOxgRoEbNJuNoPeODStPAhic, district-bQzraKRXVdMVFsXZoMZwoOmNqRWUXQRiOgOPctYCcLxUifsuVA",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-1,en,False,1,,,,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"1, 2","sec-tag-1, sec-tag-2",2008-01-01,1,Ongoing,0,0,0,0,en,False,9,public,Public\r +0,100000,,,1,1,disaster-type-1,summary,en,2008-01-01,2,1,,2,rpo: disaster-type-1 - 01-2008 - event-1,1,iqzlhqbiawyyplublqdivahhveecxxglgcgoncuyqhtdpbdezb,,en,6,2008-01-01T00:00:00.123456Z,,,project-OtUSWoBPfTganEeiLoHRCaaSvhBSiEeoyfUZgguxtiyXWiPRje,1,Emergency Operation,1,sect-1,0,Bilateral,1,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"ctFhgpIiyD, lmiYIxHGrk","2, 1","False, False","False, False","district-DejWoRURzZJxfYzaqIhDxRVRqLyOxgRoEbNJuNoPeODStPAhic, district-bQzraKRXVdMVFsXZoMZwoOmNqRWUXQRiOgOPctYCcLxUifsuVA",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-1,en,False,1,,,,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"1, 2","sec-tag-1, sec-tag-2",2008-01-01,1,Ongoing,0,0,0,0,en,False,10,public,Public\r +0,100000,,,1,1,disaster-type-1,summary,en,2008-01-01,2,1,,2,rpo: disaster-type-1 - 01-2008 - event-1,1,iqzlhqbiawyyplublqdivahhveecxxglgcgoncuyqhtdpbdezb,,en,7,2008-01-01T00:00:00.123456Z,,,project-giWhLUywBuYiprPfpJMMUMsXSbQtnHMGmVzsPdYYpFyhpFOMeH,1,Emergency Operation,1,sect-1,0,Bilateral,1,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"ctFhgpIiyD, lmiYIxHGrk","2, 1","False, False","False, False","district-DejWoRURzZJxfYzaqIhDxRVRqLyOxgRoEbNJuNoPeODStPAhic, district-bQzraKRXVdMVFsXZoMZwoOmNqRWUXQRiOgOPctYCcLxUifsuVA",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-1,en,False,1,,,,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"1, 2","sec-tag-1, sec-tag-2",2008-01-01,1,Ongoing,0,0,0,0,en,False,11,public,Public\r +0,100000,,,1,1,disaster-type-1,summary,en,2008-01-01,2,1,,2,rpo: disaster-type-1 - 01-2008 - event-1,1,iqzlhqbiawyyplublqdivahhveecxxglgcgoncuyqhtdpbdezb,,en,8,2008-01-01T00:00:00.123456Z,,,project-bLeaqncdYzGsOTGXABSzfOIINjrftfGnZjIuzLOWPRPetSBUpd,1,Emergency Operation,1,sect-1,0,Bilateral,1,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"ctFhgpIiyD, lmiYIxHGrk","2, 1","False, False","False, False","district-DejWoRURzZJxfYzaqIhDxRVRqLyOxgRoEbNJuNoPeODStPAhic, district-bQzraKRXVdMVFsXZoMZwoOmNqRWUXQRiOgOPctYCcLxUifsuVA",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-1,en,False,1,,,,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"1, 2","sec-tag-1, sec-tag-2",2008-01-01,1,Ongoing,0,0,0,0,en,False,12,public,Public\r +0,100000,,,1,1,disaster-type-1,summary,en,2008-01-01,2,1,,2,rpo: disaster-type-1 - 01-2008 - event-1,1,iqzlhqbiawyyplublqdivahhveecxxglgcgoncuyqhtdpbdezb,,en,9,2008-01-01T00:00:00.123456Z,,,project-iSakFwHHYUqkxiVXrUhXbvZBrHeqTKOeFDGxdFKkxkqXgKRUho,1,Emergency Operation,1,sect-1,0,Bilateral,1,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"ctFhgpIiyD, lmiYIxHGrk","2, 1","False, False","False, False","district-DejWoRURzZJxfYzaqIhDxRVRqLyOxgRoEbNJuNoPeODStPAhic, district-bQzraKRXVdMVFsXZoMZwoOmNqRWUXQRiOgOPctYCcLxUifsuVA",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-1,en,False,1,,,,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"1, 2","sec-tag-1, sec-tag-2",2008-01-01,1,Ongoing,0,0,0,0,en,False,13,public,Public\r +0,100000,,,1,1,disaster-type-1,summary,en,2008-01-01,2,1,,2,rpo: disaster-type-1 - 01-2008 - event-1,1,iqzlhqbiawyyplublqdivahhveecxxglgcgoncuyqhtdpbdezb,,en,10,2008-01-01T00:00:00.123456Z,,,project-cJZTVPAoupAUureKxhGRdloZHczeDsXtufJDaxmsKYtVNpDxLF,1,Emergency Operation,1,sect-1,0,Bilateral,1,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"ctFhgpIiyD, lmiYIxHGrk","2, 1","False, False","False, False","district-DejWoRURzZJxfYzaqIhDxRVRqLyOxgRoEbNJuNoPeODStPAhic, district-bQzraKRXVdMVFsXZoMZwoOmNqRWUXQRiOgOPctYCcLxUifsuVA",0,0,0,0,1,2008-01-01T00:00:00.123456Z,1,2008-01-01T00:00:00.123456Z,regional-project-1,en,False,1,,,,1,bV,rpo,country-1,society-name-iVgRVIfLBcbfnoGMbJmTPSIAoCLrZaWZkSBvrjnWvgfygwwMqZ,"1, 2","sec-tag-1, sec-tag-2",2008-01-01,1,Ongoing,0,0,0,0,en,False,14,public,Public\r """ snapshots["TestProjectAPI::test_project_delete 1"] = b"" @@ -358,14 +113,14 @@ { "actual_expenditure": 0, "annual_splits": [], - "budget_amount": 6440000, + "budget_amount": 8500000, "description": "", "document": None, "dtype": 3, "dtype_detail": { "id": 3, - "name": "disaster-type-MSVGtSJuTVJOnmnNTsRwRiTPlGISOuThWwJELKQTARVIsBZaHg", - "summary": "byjdQdmrWYksRqjdSYsnWIcwCgNRVJoVPJypGYYZSsSQdyyAYRuJdaVqmNXCoOTTPxWLIVMmXUmsClRellVGhycBrJqikLqavDTjcjuMdXONQtFYKJweYTuHolHeYGkAIIzfwonQvvxsnWNHEJWPahQwCpPNNpcRuyYhyqIUsbHXxGZGCFcsPmuGfgkXIIaOenQOXnRBgnISVXBPeVRjbDTvcfedlYqJeKoqAyCOzBubyRhIaPUNeWVLcSewGgsYRtMfsWCyzQbEkIoiVzYZIsOjtRYUPxaJJjhcaKMzIJftnVVUwnAPGjkloNqmhlQZKdWJDPJesQeqgmULFvwiQPpgsNemuFCvNQtSLjKKxZuBkaupYoTVPBrxiRUvEDCwXtFJglPMfriImqUOeUebGObLLzXLncJqIIEPXjxzoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYxyEDccPugTHOrVqLIKlyPyxLPeHq", + "name": "disaster-type-SOuThWwJELKQTARVIsBZaHgbyjdQdmrWYksRqjdSYsnWIcwCgN", + "summary": "RVJoVPJypGYYZSsSQdyyAYRuJdaVqmNXCoOTTPxWLIVMmXUmsClRellVGhycBrJqikLqavDTjcjuMdXONQtFYKJweYTuHolHeYGkAIIzfwonQvvxsnWNHEJWPahQwCpPNNpcRuyYhyqIUsbHXxGZGCFcsPmuGfgkXIIaOenQOXnRBgnISVXBPeVRjbDTvcfedlYqJeKoqAyCOzBubyRhIaPUNeWVLcSewGgsYRtMfsWCyzQbEkIoiVzYZIsOjtRYUPxaJJjhcaKMzIJftnVVUwnAPGjkloNqmhlQZKdWJDPJesQeqgmULFvwiQPpgsNemuFCvNQtSLjKKxZuBkaupYoTVPBrxiRUvEDCwXtFJglPMfriImqUOeUebGObLLzXLncJqIIEPXjxzoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYxyEDccPugTHOrVqLIKlyPyxLPeHqyoHzwwFYEMaGiCkoeGPrnjlkxMT", "translation_module_original_language": "en", }, "end_date": "2008-01-01", @@ -375,9 +130,9 @@ "dtype": 1, "emergency_response_contact_email": None, "id": 2, - "name": "event-xNooiEjDVMxASJEWIZQnWpRWMYfHCHTxeKhdJGmKIjkuHChRnT", + "name": "N/A: disaster-type-hlIzHiUoaWbtDRUIBIyopDwjrmUWhcZQANXbpnegMcCMRTdpVc - 01-2008 - LFfGCZdDiG", "parent_event": 1, - "slug": "lffgczddigadkdjdrztubzqavnlecbwseideecsalxixpupaxy", + "slug": "adkdjdrztubzqavnlecbwseideecsalxixpupaxycyyfrqiipw", "start_date": None, "translation_module_original_language": "en", }, @@ -385,7 +140,7 @@ "modified_at": "2008-01-01T00:00:00.123456Z", "modified_by": None, "modified_by_detail": None, - "name": "project-yoHzwwFYEMaGiCkoeGPrnjlkxMThQoAZvUhEREEnLkPAbpciKL", + "name": "project-hQoAZvUhEREEnLkPAbpciKLkiOGcKjdkqlHzMKObUUQsfnCMEE", "operation_type": 0, "operation_type_display": "Programme", "primary_sector": 1, @@ -413,7 +168,7 @@ "created_at": "2008-01-01T00:00:00.123456Z", "id": 1, "modified_at": "2008-01-01T00:00:00.123456Z", - "name": "regional-project-fnCMEEkoAMjYLXlNQGqkURvDMLeoyyigbmHGRAjMglENMcYIGW", + "name": "regional-project-yyigbmHGRAjMglENMcYIGWhfEQiMIaXRPBHAxcSHBoZEYXywLZ", "translation_module_original_language": "en", "translation_module_skip_auto_translation": False, }, @@ -454,14 +209,14 @@ { "actual_expenditure": 0, "annual_splits": [], - "budget_amount": 6440000, + "budget_amount": 8500000, "description": "", "document": None, "dtype": 3, "dtype_detail": { "id": 3, - "name": "disaster-type-MSVGtSJuTVJOnmnNTsRwRiTPlGISOuThWwJELKQTARVIsBZaHg", - "summary": "byjdQdmrWYksRqjdSYsnWIcwCgNRVJoVPJypGYYZSsSQdyyAYRuJdaVqmNXCoOTTPxWLIVMmXUmsClRellVGhycBrJqikLqavDTjcjuMdXONQtFYKJweYTuHolHeYGkAIIzfwonQvvxsnWNHEJWPahQwCpPNNpcRuyYhyqIUsbHXxGZGCFcsPmuGfgkXIIaOenQOXnRBgnISVXBPeVRjbDTvcfedlYqJeKoqAyCOzBubyRhIaPUNeWVLcSewGgsYRtMfsWCyzQbEkIoiVzYZIsOjtRYUPxaJJjhcaKMzIJftnVVUwnAPGjkloNqmhlQZKdWJDPJesQeqgmULFvwiQPpgsNemuFCvNQtSLjKKxZuBkaupYoTVPBrxiRUvEDCwXtFJglPMfriImqUOeUebGObLLzXLncJqIIEPXjxzoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYxyEDccPugTHOrVqLIKlyPyxLPeHq", + "name": "disaster-type-SOuThWwJELKQTARVIsBZaHgbyjdQdmrWYksRqjdSYsnWIcwCgN", + "summary": "RVJoVPJypGYYZSsSQdyyAYRuJdaVqmNXCoOTTPxWLIVMmXUmsClRellVGhycBrJqikLqavDTjcjuMdXONQtFYKJweYTuHolHeYGkAIIzfwonQvvxsnWNHEJWPahQwCpPNNpcRuyYhyqIUsbHXxGZGCFcsPmuGfgkXIIaOenQOXnRBgnISVXBPeVRjbDTvcfedlYqJeKoqAyCOzBubyRhIaPUNeWVLcSewGgsYRtMfsWCyzQbEkIoiVzYZIsOjtRYUPxaJJjhcaKMzIJftnVVUwnAPGjkloNqmhlQZKdWJDPJesQeqgmULFvwiQPpgsNemuFCvNQtSLjKKxZuBkaupYoTVPBrxiRUvEDCwXtFJglPMfriImqUOeUebGObLLzXLncJqIIEPXjxzoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYxyEDccPugTHOrVqLIKlyPyxLPeHqyoHzwwFYEMaGiCkoeGPrnjlkxMT", "translation_module_original_language": "en", }, "end_date": "2008-01-01", @@ -471,9 +226,9 @@ "dtype": 1, "emergency_response_contact_email": None, "id": 2, - "name": "event-xNooiEjDVMxASJEWIZQnWpRWMYfHCHTxeKhdJGmKIjkuHChRnT", + "name": "N/A: disaster-type-hlIzHiUoaWbtDRUIBIyopDwjrmUWhcZQANXbpnegMcCMRTdpVc - 01-2008 - LFfGCZdDiG", "parent_event": 1, - "slug": "lffgczddigadkdjdrztubzqavnlecbwseideecsalxixpupaxy", + "slug": "adkdjdrztubzqavnlecbwseideecsalxixpupaxycyyfrqiipw", "start_date": None, "translation_module_original_language": "en", }, @@ -481,7 +236,7 @@ "modified_at": "2008-01-01T00:00:00.123456Z", "modified_by": None, "modified_by_detail": None, - "name": "project-yoHzwwFYEMaGiCkoeGPrnjlkxMThQoAZvUhEREEnLkPAbpciKL", + "name": "project-hQoAZvUhEREEnLkPAbpciKLkiOGcKjdkqlHzMKObUUQsfnCMEE", "operation_type": 0, "operation_type_display": "Programme", "primary_sector": 1, @@ -509,7 +264,7 @@ "created_at": "2008-01-01T00:00:00.123456Z", "id": 1, "modified_at": "2008-01-01T00:00:00.123456Z", - "name": "regional-project-fnCMEEkoAMjYLXlNQGqkURvDMLeoyyigbmHGRAjMglENMcYIGW", + "name": "regional-project-yyigbmHGRAjMglENMcYIGWhfEQiMIaXRPBHAxcSHBoZEYXywLZ", "translation_module_original_language": "en", "translation_module_skip_auto_translation": False, }, @@ -542,14 +297,14 @@ { "actual_expenditure": 0, "annual_splits": [], - "budget_amount": 6090000, + "budget_amount": 9540000, "description": "", "document": None, "dtype": 6, "dtype_detail": { "id": 6, - "name": "disaster-type-blCoqPewfsGGIPfYroghexcImvmRvqtVXRrmTMiWTVIqaXtswY", - "summary": "zzLWPaEPGWjzooUVnEoHLYJWDUDvYfumBXSAnCCJbxiKitVaFZQwvoABRWzWXSItuLbKYcijvKOZMMKzynzeIymEgvKCOtfkgRJlcSMFblmeysnosQHeDdxHakuAzkhiIAEVeynintBTQEkMKtLmGTRDrmajCezMZpHvKFDDKcVfsPDwSTYtzNZlAplNUBDyQlSKgzScpkrOIsQeSUUnFAWJhxeWgGXXuACkqnGcDbeOSRVDyvVzmzcaqhTiuQVDFDefJQpTCiErkkbMglshIVzkeQWaRrjCwlnTcRInCSdOZHPQTQgyStCdMadXyXmpxpmfbAbavmRQeogZQkUkcAGguuJOmNnIzBhongwulazPuaynDoeQrPNxcenAtXMFgTIYKkqgMuOSyRXSivlOWSuQEevbMLCyGOVoGLTaobNWhtpVBWpNfdixFsmjynPcpUMCVviruPYWcHYAPsWboUvvpnIdQpZRSUoMyHulCOaeFemdOjni", + "name": "disaster-type-swYzzLWPaEPGWjzooUVnEoHLYJWDUDvYfumBXSAnCCJbxiKitV", + "summary": "aFZQwvoABRWzWXSItuLbKYcijvKOZMMKzynzeIymEgvKCOtfkgRJlcSMFblmeysnosQHeDdxHakuAzkhiIAEVeynintBTQEkMKtLmGTRDrmajCezMZpHvKFDDKcVfsPDwSTYtzNZlAplNUBDyQlSKgzScpkrOIsQeSUUnFAWJhxeWgGXXuACkqnGcDbeOSRVDyvVzmzcaqhTiuQVDFDefJQpTCiErkkbMglshIVzkeQWaRrjCwlnTcRInCSdOZHPQTQgyStCdMadXyXmpxpmfbAbavmRQeogZQkUkcAGguuJOmNnIzBhongwulazPuaynDoeQrPNxcenAtXMFgTIYKkqgMuOSyRXSivlOWSuQEevbMLCyGOVoGLTaobNWhtpVBWpNfdixFsmjynPcpUMCVviruPYWcHYAPsWboUvvpnIdQpZRSUoMyHulCOaeFemdOjniflLJYnpGfBUDtkUmpBlMptsKCOmrYEfxzykECBGNVBWjYEb", "translation_module_original_language": "en", }, "end_date": "2008-01-01", @@ -559,9 +314,9 @@ "dtype": 4, "emergency_response_contact_email": None, "id": 4, - "name": "event-ZoHPvALvPPYuFLQSHJCDtKiYtkYqoExsXdjwsDkNkTIsllTSQY", + "name": "N/A: disaster-type-bfICRQfGzmFuMMGdQxzjTBxyxaswwtCJfnUCVAZCskZUBUAiLM - 01-2008 - kIthbzFXjD", "parent_event": 3, - "slug": "jkphcukicqxlnjtcquwjxcikithbzfxjdujavigvptseswkqjz", + "slug": "ujavigvptseswkqjzkucvshuecirjhtbznocwfudmpmlhoyxrm", "start_date": None, "translation_module_original_language": "en", }, @@ -569,7 +324,7 @@ "modified_at": "2008-01-01T00:00:00.123456Z", "modified_by": None, "modified_by_detail": None, - "name": "project-flLJYnpGfBUDtkUmpBlMptsKCOmrYEfxzykECBGNVBWjYEbWyB", + "name": "project-WyBfWtMIjJUlqyDtDsyJMEeviTEmjmaaGUUxFzAzVxyFtPLeAc", "operation_type": 1, "operation_type_display": "Emergency Operation", "primary_sector": 1, @@ -581,10 +336,10 @@ "project_country": 4, "project_country_detail": { "id": 4, - "iso": "rN", - "iso3": "OJn", - "name": "country-XkvKQjkjlXTdAttUXCsOlhimaNWqaDFFIZaMFpnLQEDACfMMap", - "society_name": "society-name-dljdPwcjcQKMtvfdgAlkRsNQSSMKYJlDVLxcfXtuxyeWBJesEi", + "iso": "Al", + "iso3": "kRs", + "name": "country-imaNWqaDFFIZaMFpnLQEDACfMMapJrNOJndljdPwcjcQKMtvfd", + "society_name": "society-name-NQSSMKYJlDVLxcfXtuxyeWBJesEihSrvHAHnSnNdgKUOHfEUSM", }, "project_districts": [], "project_districts_detail": [], @@ -597,7 +352,7 @@ "created_at": "2008-01-01T00:00:00.123456Z", "id": 2, "modified_at": "2008-01-01T00:00:00.123456Z", - "name": "regional-project-JMEeviTEmjmaaGUUxFzAzVxyFtPLeAchyKkmWBqXWUwGTFOSxS", + "name": "regional-project-VppEcxOTRbSQPjqMDRjqpMLQkahXfPTyzTLfHmBkBqStGIQyLt", "translation_module_original_language": "en", "translation_module_skip_auto_translation": False, }, @@ -607,10 +362,10 @@ "reporting_ns_contact_role": None, "reporting_ns_detail": { "id": 3, - "iso": "yP", - "iso3": "nSZ", - "name": "country-MIaXRPBHAxcSHBoZEYXywLZVWSKgBiqEXofsMIAqmaTVYaKHhH", - "society_name": "society-name-uAxgjBPLqqIBKxNrRzWnAJYJElxJJEqtKwXTzViQhVoCYSkgnG", + "iso": "YJ", + "iso3": "Elx", + "name": "country-gBiqEXofsMIAqmaTVYaKHhHayPnSZuAxgjBPLqqIBKxNrRzWnA", + "society_name": "society-name-JJEqtKwXTzViQhVoCYSkgnGzYvZJNSRTdkyOaZfjEMBfeqoxfM", }, "secondary_sectors": [], "secondary_sectors_display": [], @@ -635,14 +390,14 @@ snapshots["TestProjectAPI::test_project_read 1"] = { "actual_expenditure": 0, "annual_splits": [], - "budget_amount": 6440000, + "budget_amount": 8500000, "description": "", "document": None, "dtype": 3, "dtype_detail": { "id": 3, - "name": "disaster-type-MSVGtSJuTVJOnmnNTsRwRiTPlGISOuThWwJELKQTARVIsBZaHg", - "summary": "byjdQdmrWYksRqjdSYsnWIcwCgNRVJoVPJypGYYZSsSQdyyAYRuJdaVqmNXCoOTTPxWLIVMmXUmsClRellVGhycBrJqikLqavDTjcjuMdXONQtFYKJweYTuHolHeYGkAIIzfwonQvvxsnWNHEJWPahQwCpPNNpcRuyYhyqIUsbHXxGZGCFcsPmuGfgkXIIaOenQOXnRBgnISVXBPeVRjbDTvcfedlYqJeKoqAyCOzBubyRhIaPUNeWVLcSewGgsYRtMfsWCyzQbEkIoiVzYZIsOjtRYUPxaJJjhcaKMzIJftnVVUwnAPGjkloNqmhlQZKdWJDPJesQeqgmULFvwiQPpgsNemuFCvNQtSLjKKxZuBkaupYoTVPBrxiRUvEDCwXtFJglPMfriImqUOeUebGObLLzXLncJqIIEPXjxzoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYxyEDccPugTHOrVqLIKlyPyxLPeHq", + "name": "disaster-type-SOuThWwJELKQTARVIsBZaHgbyjdQdmrWYksRqjdSYsnWIcwCgN", + "summary": "RVJoVPJypGYYZSsSQdyyAYRuJdaVqmNXCoOTTPxWLIVMmXUmsClRellVGhycBrJqikLqavDTjcjuMdXONQtFYKJweYTuHolHeYGkAIIzfwonQvvxsnWNHEJWPahQwCpPNNpcRuyYhyqIUsbHXxGZGCFcsPmuGfgkXIIaOenQOXnRBgnISVXBPeVRjbDTvcfedlYqJeKoqAyCOzBubyRhIaPUNeWVLcSewGgsYRtMfsWCyzQbEkIoiVzYZIsOjtRYUPxaJJjhcaKMzIJftnVVUwnAPGjkloNqmhlQZKdWJDPJesQeqgmULFvwiQPpgsNemuFCvNQtSLjKKxZuBkaupYoTVPBrxiRUvEDCwXtFJglPMfriImqUOeUebGObLLzXLncJqIIEPXjxzoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYxyEDccPugTHOrVqLIKlyPyxLPeHqyoHzwwFYEMaGiCkoeGPrnjlkxMT", "translation_module_original_language": "en", }, "end_date": "2008-01-01", @@ -652,9 +407,9 @@ "dtype": 1, "emergency_response_contact_email": None, "id": 2, - "name": "event-xNooiEjDVMxASJEWIZQnWpRWMYfHCHTxeKhdJGmKIjkuHChRnT", + "name": "N/A: disaster-type-hlIzHiUoaWbtDRUIBIyopDwjrmUWhcZQANXbpnegMcCMRTdpVc - 01-2008 - LFfGCZdDiG", "parent_event": 1, - "slug": "lffgczddigadkdjdrztubzqavnlecbwseideecsalxixpupaxy", + "slug": "adkdjdrztubzqavnlecbwseideecsalxixpupaxycyyfrqiipw", "start_date": None, "translation_module_original_language": "en", }, @@ -662,7 +417,7 @@ "modified_at": "2008-01-01T00:00:00.123456Z", "modified_by": None, "modified_by_detail": None, - "name": "project-yoHzwwFYEMaGiCkoeGPrnjlkxMThQoAZvUhEREEnLkPAbpciKL", + "name": "project-hQoAZvUhEREEnLkPAbpciKLkiOGcKjdkqlHzMKObUUQsfnCMEE", "operation_type": 0, "operation_type_display": "Programme", "primary_sector": 1, @@ -690,7 +445,7 @@ "created_at": "2008-01-01T00:00:00.123456Z", "id": 1, "modified_at": "2008-01-01T00:00:00.123456Z", - "name": "regional-project-fnCMEEkoAMjYLXlNQGqkURvDMLeoyyigbmHGRAjMglENMcYIGW", + "name": "regional-project-yyigbmHGRAjMglENMcYIGWhfEQiMIaXRPBHAxcSHBoZEYXywLZ", "translation_module_original_language": "en", "translation_module_skip_auto_translation": False, }, @@ -724,14 +479,14 @@ snapshots["TestProjectAPI::test_project_update 1"] = { "actual_expenditure": 0, "annual_splits": [], - "budget_amount": 6440000, + "budget_amount": 8500000, "description": "", "document": None, "dtype": 3, "dtype_detail": { "id": 3, - "name": "disaster-type-MSVGtSJuTVJOnmnNTsRwRiTPlGISOuThWwJELKQTARVIsBZaHg", - "summary": "byjdQdmrWYksRqjdSYsnWIcwCgNRVJoVPJypGYYZSsSQdyyAYRuJdaVqmNXCoOTTPxWLIVMmXUmsClRellVGhycBrJqikLqavDTjcjuMdXONQtFYKJweYTuHolHeYGkAIIzfwonQvvxsnWNHEJWPahQwCpPNNpcRuyYhyqIUsbHXxGZGCFcsPmuGfgkXIIaOenQOXnRBgnISVXBPeVRjbDTvcfedlYqJeKoqAyCOzBubyRhIaPUNeWVLcSewGgsYRtMfsWCyzQbEkIoiVzYZIsOjtRYUPxaJJjhcaKMzIJftnVVUwnAPGjkloNqmhlQZKdWJDPJesQeqgmULFvwiQPpgsNemuFCvNQtSLjKKxZuBkaupYoTVPBrxiRUvEDCwXtFJglPMfriImqUOeUebGObLLzXLncJqIIEPXjxzoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYxyEDccPugTHOrVqLIKlyPyxLPeHq", + "name": "disaster-type-SOuThWwJELKQTARVIsBZaHgbyjdQdmrWYksRqjdSYsnWIcwCgN", + "summary": "RVJoVPJypGYYZSsSQdyyAYRuJdaVqmNXCoOTTPxWLIVMmXUmsClRellVGhycBrJqikLqavDTjcjuMdXONQtFYKJweYTuHolHeYGkAIIzfwonQvvxsnWNHEJWPahQwCpPNNpcRuyYhyqIUsbHXxGZGCFcsPmuGfgkXIIaOenQOXnRBgnISVXBPeVRjbDTvcfedlYqJeKoqAyCOzBubyRhIaPUNeWVLcSewGgsYRtMfsWCyzQbEkIoiVzYZIsOjtRYUPxaJJjhcaKMzIJftnVVUwnAPGjkloNqmhlQZKdWJDPJesQeqgmULFvwiQPpgsNemuFCvNQtSLjKKxZuBkaupYoTVPBrxiRUvEDCwXtFJglPMfriImqUOeUebGObLLzXLncJqIIEPXjxzoXLUsiDGGfzxGaQpZNRkWGiCklKKQjVUEwcoWFoeqxocQnHYxyEDccPugTHOrVqLIKlyPyxLPeHqyoHzwwFYEMaGiCkoeGPrnjlkxMT", "translation_module_original_language": "en", }, "end_date": "2008-01-01", @@ -741,9 +496,9 @@ "dtype": 1, "emergency_response_contact_email": None, "id": 2, - "name": "event-xNooiEjDVMxASJEWIZQnWpRWMYfHCHTxeKhdJGmKIjkuHChRnT", + "name": "N/A: disaster-type-hlIzHiUoaWbtDRUIBIyopDwjrmUWhcZQANXbpnegMcCMRTdpVc - 01-2008 - LFfGCZdDiG", "parent_event": 1, - "slug": "lffgczddigadkdjdrztubzqavnlecbwseideecsalxixpupaxy", + "slug": "adkdjdrztubzqavnlecbwseideecsalxixpupaxycyyfrqiipw", "start_date": None, "translation_module_original_language": "en", }, @@ -763,13 +518,13 @@ "project_country": 3, "project_country_detail": { "id": 3, - "iso": "ay", - "iso3": "PnS", - "name": "country-iMIaXRPBHAxcSHBoZEYXywLZVWSKgBiqEXofsMIAqmaTVYaKHh", - "society_name": "society-name-ZuAxgjBPLqqIBKxNrRzWnAJYJElxJJEqtKwXTzViQhVoCYSkgn", + "iso": "AJ", + "iso3": "YJE", + "name": "country-SKgBiqEXofsMIAqmaTVYaKHhHayPnSZuAxgjBPLqqIBKxNrRzW", + "society_name": "society-name-lxJJEqtKwXTzViQhVoCYSkgnGzYvZJNSRTdkyOaZfjEMBfeqox", }, "project_districts": [1], - "project_districts_detail": [{"id": 1, "name": "district-kyJycXkvKQjkjlXTdAttUXCsOlhimaNWqaDFFIZaMFpnLQEDAC"}], + "project_districts_detail": [{"id": 1, "name": "district-imaNWqaDFFIZaMFpnLQEDACfMMapJrNOJndljdPwcjcQKMtvfd"}], "reached_female": 0, "reached_male": 0, "reached_other": 0, @@ -779,7 +534,7 @@ "created_at": "2008-01-01T00:00:00.123456Z", "id": 1, "modified_at": "2008-01-01T00:00:00.123456Z", - "name": "regional-project-fnCMEEkoAMjYLXlNQGqkURvDMLeoyyigbmHGRAjMglENMcYIGW", + "name": "regional-project-yyigbmHGRAjMglENMcYIGWhfEQiMIaXRPBHAxcSHBoZEYXywLZ", "translation_module_original_language": "en", "translation_module_skip_auto_translation": False, }, @@ -789,10 +544,10 @@ "reporting_ns_contact_role": None, "reporting_ns_detail": { "id": 3, - "iso": "ay", - "iso3": "PnS", - "name": "country-iMIaXRPBHAxcSHBoZEYXywLZVWSKgBiqEXofsMIAqmaTVYaKHh", - "society_name": "society-name-ZuAxgjBPLqqIBKxNrRzWnAJYJElxJJEqtKwXTzViQhVoCYSkgn", + "iso": "AJ", + "iso3": "YJE", + "name": "country-SKgBiqEXofsMIAqmaTVYaKHhHayPnSZuAxgjBPLqqIBKxNrRzW", + "society_name": "society-name-lxJJEqtKwXTzViQhVoCYSkgnGzYvZJNSRTdkyOaZfjEMBfeqox", }, "secondary_sectors": [], "secondary_sectors_display": [], diff --git a/deployments/tests.py b/deployments/tests.py index 68358da75..5e4ef1af9 100644 --- a/deployments/tests.py +++ b/deployments/tests.py @@ -4,7 +4,7 @@ import api.models as models from api.factories import country, district -from api.factories.event import EventFactory +from api.factories.event import DisasterTypeFactory, EventFactory from deployments.factories.emergency_project import ( EmergencyProjectActivityActionFactory, EmergencyProjectActivityFactory, @@ -16,11 +16,15 @@ SectorFactory, SectorTagFactory, ) +from deployments.factories.regional_project import RegionalProjectFactory from deployments.factories.user import UserFactory from deployments.models import ( EmergencyProject, EmergencyProjectActivity, + OperationTypes, + ProgrammeTypes, Project, + Statuses, VisibilityCharChoices, ) from main.test_case import APITestCase, SnapshotTestCase @@ -100,7 +104,6 @@ def test_project_create(self): # check response self.assert_201(response) - self.assertMatchSnapshot(json.loads(response.content)) self.assertTrue(Project.objects.get(name=new_project_name)) def test_project_read(self): @@ -188,18 +191,35 @@ def test_personnel_csv_api(self): self.assertMatchSnapshot(resp.content.decode("utf-8")) def test_project_csv_api(self): - _country = country.CountryFactory() - sct = SectorFactory() - sct_1 = SectorTagFactory() - sct_2 = SectorTagFactory() + _country = country.CountryFactory(name="country-1") + sct = SectorFactory(title="sect-1") + sct_1 = SectorTagFactory(title="sec-tag-1") + sct_2 = SectorTagFactory(title="sec-tag-2") district1 = district.DistrictFactory(country=_country) district2 = district.DistrictFactory(country=_country) + dtype = DisasterTypeFactory(name="disaster-type-1", summary="summary") + regional_project = RegionalProjectFactory(name="regional-project-1") + event = EventFactory( + countries=[_country.id], + districts=[district1.id, district2.id], + dtype=dtype, + title="event-1", + ) ProjectFactory.create_batch( 10, project_districts=[district1, district2], + budget_amount=100000, primary_sector=sct, + event=event, + regional_project=regional_project, secondary_sectors=[sct_1, sct_2], + dtype=dtype, visibility=VisibilityCharChoices.PUBLIC, + project_country=_country, + reporting_ns=_country, + status=Statuses.COMPLETED, + programme_type=ProgrammeTypes.BILATERAL, + operation_type=OperationTypes.EMERGENCY_OPERATION, ) url = "/api/v2/project/?format=csv" @@ -225,14 +245,18 @@ def test_global_project_api(self): ProjectFactory.create_batch( 2, primary_sector=sct, + programme_type=programme_type, + reporting_ns=ns, project_districts=project_districts, + secondary_sectors=secondary_sectors, visibility=VisibilityCharChoices.PUBLIC, + budget_amount=100000, ) - for project_districts, secondary_sectors in [ - ([c1_district1, c1_district2], [sct_1, sct_2]), - ([c1_district1, c1_district2], [sct_3, sct_4]), - ([c2_district1, c2_district2], [sct_1, sct_3]), - ([c2_district1, c2_district2], [sct_2, sct_4]), + for project_districts, secondary_sectors, programme_type in [ + ([c1_district1, c1_district2], [sct_1, sct_2], ProgrammeTypes.BILATERAL), + ([c1_district1, c1_district2], [sct_3, sct_4], ProgrammeTypes.MULTILATERAL), + ([c2_district1, c2_district2], [sct_1, sct_3], ProgrammeTypes.DOMESTIC), + ([c2_district1, c2_district2], [sct_2, sct_4], ProgrammeTypes.DOMESTIC), ] for ns in [ns_1, ns_2] ]