geonode.br.tests
Submodules
Classes
A model used for managing the Geonode instance's global configuration, without a need for reloading the instance. |
|
Validate_backup_file_hash |
|
A model used for managing the Geonode instance's global configuration, without a need for reloading the instance. |
|
Functions
|
A method generating MD5 hash of the provided file. |
|
A method generating MD5 hash of the provided file. |
Package Contents
- class geonode.br.tests.GeoNodeBaseTestSupport[source]
Bases:
django.test.testcases.TestCase- type = None
- obj_ids = []
- integration = False
- fixtures = ['initial_data.json', 'group_test_data.json', 'default_oauth_apps.json']
- class geonode.br.tests.RestoredBackupFactory[source]
Bases:
factory.django.DjangoModelFactory- name
- archive_md5
- restoration_date
- creation_date
- geonode.br.tests.md5_file_hash(file_path)[source]
A method generating MD5 hash of the provided file.
- Parameters:
file_path – file’s path with an extension, which will be opened for reading and generating md5 hash
- Returns:
hex representation of md5 hash
- class geonode.br.tests.Configuration[source]
Bases:
geonode.singleton.SingletonModelA model used for managing the Geonode instance’s global configuration, without a need for reloading the instance.
Usage: from geonode.base.models import Configuration
config = Configuration.load()
- read_only
- maintenance
- class geonode.br.tests.GeoNodeBaseTestSupport[source]
Bases:
django.test.testcases.TestCase- type = None
- obj_ids = []
- integration = False
- fixtures = ['initial_data.json', 'group_test_data.json', 'default_oauth_apps.json']
- class geonode.br.tests.RestoredBackupFactory[source]
Bases:
factory.django.DjangoModelFactory- name
- archive_md5
- restoration_date
- creation_date
- geonode.br.tests.md5_file_hash(file_path)[source]
A method generating MD5 hash of the provided file.
- Parameters:
file_path – file’s path with an extension, which will be opened for reading and generating md5 hash
- Returns:
hex representation of md5 hash
- class geonode.br.tests.RestoreCommand
Bases:
django.core.management.base.BaseCommand- help = 'Restore the GeoNode application data'
- add_arguments(parser)
- handle(**options)
- execute_restore(**options)
- validate_backup_file_options(**options) None
Method validating –backup-file and –backup-files-dir options
- Parameters:
options – self.handle() method options
- Raises:
Django CommandError, if options violate requirements
- Returns:
None
- parse_backup_files_dir(backup_files_dir: str) str | None
Method picking the Backup Archive to be restored from the Backup Files Directory. Only archives created/modified AFTER the last restored dumps are considered.
- Parameters:
backup_files_dir – path to the directory containing backup files
- Returns:
backup file path, if a proper backup archive was found, and None otherwise
- validate_backup_file_hash(backup_file: str) str
Method calculating the hash of the backup file and validating it if the proper *.md5 file exists in the backup_file directory.
- Parameters:
backup_file – path to the backup_file
- Returns:
backup_file hash
- check_backup_ini_settings(backup_file: str) str
Method checking backup file’s original settings availability
- Parameters:
backup_file – path to the backup_file
- Returns:
backup_ini_file_path original settings used by the backup file
- restore_geoserver_backup(config, settings, target_folder, skip_geoserver_info, skip_geoserver_security, ignore_errors, soft_reset)
Restore GeoServer Catalog
- prepare_geoserver_gwc_config(config, settings)
- restore_geoserver_raster_data(config, settings, target_folder)
- restore_geoserver_vector_data(config, settings, target_folder, soft_reset)
Restore Vectorial Data from DB
- restore_geoserver_externals(config, settings, target_folder)
Restore external references from XML files
- class geonode.br.tests.RestoreCommandHelpersTests[source]
Bases:
geonode.tests.base.GeoNodeBaseTestSupportValidate_backup_file_hash
Validate_backup_file_options() method test
- class geonode.br.tests.GeoNodeBaseTestSupport[source]
Bases:
django.test.testcases.TestCase- type = None
- obj_ids = []
- integration = False
- fixtures = ['initial_data.json', 'group_test_data.json', 'default_oauth_apps.json']
- class geonode.br.tests.Configuration[source]
Bases:
geonode.singleton.SingletonModelA model used for managing the Geonode instance’s global configuration, without a need for reloading the instance.
Usage: from geonode.base.models import Configuration
config = Configuration.load()
- read_only
- maintenance