summaryrefslogtreecommitdiffstats
path: root/tests/lib/dataset.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-10 09:54:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-10 09:54:13 +0000
commit26cac87f1cb90abc2fac2144a39ad88b3b70031d (patch)
treef97c513314a569fb51f1c8580b012d418c05fede /tests/lib/dataset.py
parentAdding upstream version 0.8.2. (diff)
downloadeos-downloader-upstream/0.9.0.tar.xz
eos-downloader-upstream/0.9.0.zip
Adding upstream version 0.9.0.upstream/0.9.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/lib/dataset.py')
-rw-r--r--tests/lib/dataset.py143
1 files changed, 72 insertions, 71 deletions
diff --git a/tests/lib/dataset.py b/tests/lib/dataset.py
index 1286456..34175e9 100644
--- a/tests/lib/dataset.py
+++ b/tests/lib/dataset.py
@@ -5,12 +5,13 @@
# flake8: noqa: W503
# flake8: noqa: W1202
-from __future__ import (absolute_import, division, print_function)
+from __future__ import absolute_import, division, print_function
+
import os
+
import eos_downloader
-from eos_downloader.eos import EOSDownloader
from eos_downloader.data import DATA_MAPPING
-
+from eos_downloader.eos import EOSDownloader
# --------------------------------------------------------------- #
# MOOCK data to use for testing
@@ -18,99 +19,99 @@ from eos_downloader.data import DATA_MAPPING
# Get Auth token
# eos_token = os.getenv('ARISTA_TOKEN')
-eos_token = os.getenv('ARISTA_TOKEN', 'invalid_token')
-eos_token_invalid = 'invalid_token'
+eos_token = os.getenv("ARISTA_TOKEN", "invalid_token")
+eos_token_invalid = "invalid_token"
eos_dataset_valid = [
{
- 'image': 'EOS',
- 'version': '4.26.3M',
- 'software': 'EOS',
- 'filename': 'EOS-4.26.3M.swi',
- 'expected_hash': 'sha512sum',
- 'remote_path': '/support/download/EOS-USA/Active Releases/4.26/EOS-4.26.3M/EOS-4.26.3M.swi',
- 'compute_checksum': True
+ "image": "EOS",
+ "version": "4.26.3M",
+ "software": "EOS",
+ "filename": "EOS-4.26.3M.swi",
+ "expected_hash": "sha512sum",
+ "remote_path": "/support/download/EOS-USA/Active Releases/4.26/EOS-4.26.3M/EOS-4.26.3M.swi",
+ "compute_checksum": True,
},
{
- 'image': 'EOS',
- 'version': '4.25.6M',
- 'software': 'EOS',
- 'filename': 'EOS-4.25.6M.swi',
- 'expected_hash': 'md5sum',
- 'remote_path': '/support/download/EOS-USA/Active Releases/4.25/EOS-4.25.6M/EOS-4.25.6M.swi',
- 'compute_checksum': True
+ "image": "EOS",
+ "version": "4.25.6M",
+ "software": "EOS",
+ "filename": "EOS-4.25.6M.swi",
+ "expected_hash": "md5sum",
+ "remote_path": "/support/download/EOS-USA/Active Releases/4.25/EOS-4.25.6M/EOS-4.25.6M.swi",
+ "compute_checksum": True,
},
{
- 'image': 'vEOS-lab',
- 'version': '4.25.6M',
- 'software': 'EOS',
- 'filename': 'vEOS-lab-4.25.6M.vmdk',
- 'expected_hash': 'md5sum',
- 'remote_path': '/support/download/EOS-USA/Active Releases/4.25/EOS-4.25.6M/vEOS-lab/vEOS-lab-4.25.6M.vmdk',
- 'compute_checksum': False
- }
+ "image": "vEOS-lab",
+ "version": "4.25.6M",
+ "software": "EOS",
+ "filename": "vEOS-lab-4.25.6M.vmdk",
+ "expected_hash": "md5sum",
+ "remote_path": "/support/download/EOS-USA/Active Releases/4.25/EOS-4.25.6M/vEOS-lab/vEOS-lab-4.25.6M.vmdk",
+ "compute_checksum": False,
+ },
]
eos_dataset_invalid = [
{
- 'image': 'default',
- 'version': '4.26.3M',
- 'software': 'EOS',
- 'filename': 'EOS-4.26.3M.swi',
- 'expected_hash': 'sha512sum',
- 'remote_path': '/support/download/EOS-USA/Active Releases/4.26/EOS-4.26.3M/EOS-4.26.3M.swi',
- 'compute_checksum': True
+ "image": "default",
+ "version": "4.26.3M",
+ "software": "EOS",
+ "filename": "EOS-4.26.3M.swi",
+ "expected_hash": "sha512sum",
+ "remote_path": "/support/download/EOS-USA/Active Releases/4.26/EOS-4.26.3M/EOS-4.26.3M.swi",
+ "compute_checksum": True,
}
]
eos_version = [
{
- 'version': 'EOS-4.23.1F',
- 'is_valid': True,
- 'major': 4,
- 'minor': 23,
- 'patch': 1,
- 'rtype': 'F'
+ "version": "EOS-4.23.1F",
+ "is_valid": True,
+ "major": 4,
+ "minor": 23,
+ "patch": 1,
+ "rtype": "F",
},
{
- 'version': 'EOS-4.23.0',
- 'is_valid': True,
- 'major': 4,
- 'minor': 23,
- 'patch': 0,
- 'rtype': None
+ "version": "EOS-4.23.0",
+ "is_valid": True,
+ "major": 4,
+ "minor": 23,
+ "patch": 0,
+ "rtype": None,
},
{
- 'version': 'EOS-4.23',
- 'is_valid': True,
- 'major': 4,
- 'minor': 23,
- 'patch': 0,
- 'rtype': None
+ "version": "EOS-4.23",
+ "is_valid": True,
+ "major": 4,
+ "minor": 23,
+ "patch": 0,
+ "rtype": None,
},
{
- 'version': 'EOS-4.23.1M',
- 'is_valid': True,
- 'major': 4,
- 'minor': 23,
- 'patch': 1,
- 'rtype': 'M'
+ "version": "EOS-4.23.1M",
+ "is_valid": True,
+ "major": 4,
+ "minor": 23,
+ "patch": 1,
+ "rtype": "M",
},
{
- 'version': 'EOS-4.23.1.F',
- 'is_valid': True,
- 'major': 4,
- 'minor': 23,
- 'patch': 1,
- 'rtype': 'F'
+ "version": "EOS-4.23.1.F",
+ "is_valid": True,
+ "major": 4,
+ "minor": 23,
+ "patch": 1,
+ "rtype": "F",
},
{
- 'version': 'EOS-5.23.1F',
- 'is_valid': False,
- 'major': 4,
- 'minor': 23,
- 'patch': 1,
- 'rtype': 'F'
+ "version": "EOS-5.23.1F",
+ "is_valid": False,
+ "major": 4,
+ "minor": 23,
+ "patch": 1,
+ "rtype": "F",
},
-] \ No newline at end of file
+]