mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 12:08:40 +02:00
updated unit tests for the associated changes in this PR
This commit is contained in:
parent
552e434096
commit
aa0a398c06
4 changed files with 101 additions and 102 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue