updated unit tests for the associated changes in this PR

This commit is contained in:
David Kennedy 2024-06-14 12:17:08 -04:00
parent 552e434096
commit aa0a398c06
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
4 changed files with 101 additions and 102 deletions

View file

@ -2370,14 +2370,15 @@ class PublicContactResource(resources.ModelResource):
class Meta:
model = models.PublicContact
use_bulk = True
batch_size = 1000
force_init_instance = True
# may want to consider these bulk options in future, so left in as comments
# use_bulk = True
# batch_size = 1000
# force_init_instance = True
def __init__(self):
"""Sets global variables for code tidyness"""
super().__init__()
self.skip_epp_save=False
self.skip_epp_save = False
def import_data(
self,
@ -2387,10 +2388,10 @@ class PublicContactResource(resources.ModelResource):
use_transactions=None,
collect_failed_rows=False,
rollback_on_validation_errors=False,
**kwargs
**kwargs,
):
"""Override import_data to set self.skip_epp_save if in kwargs"""
self.skip_epp_save = kwargs.get('skip_epp_save', False)
self.skip_epp_save = kwargs.get("skip_epp_save", False)
return super().import_data(
dataset,
dry_run,