|
1 |
| -#!/usr/bin/env python |
2 |
| - |
3 |
| -# Copyright (C) 2022-2024 Noelia Ruiz Martínez, NV Access Limited |
| 1 | +# Copyright (C) 2022-2025 Noelia Ruiz Martínez, NV Access Limited |
4 | 2 | # This file may be used under the terms of the GNU General Public License, version 2 or later.
|
5 | 3 | # For more details see: https://www.gnu.org/licenses/gpl-2.0.html
|
6 | 4 |
|
7 | 5 | import unittest
|
8 | 6 | import os
|
9 | 7 | import shutil
|
10 | 8 | import json
|
11 |
| -from _validate import ( |
12 |
| - createJson, |
13 |
| - addonManifest, |
14 |
| - manifestLoader, |
15 |
| -) |
| 9 | +from _validate import createJson, addonManifest, manifestLoader |
16 | 10 |
|
17 | 11 | TOP_DIR = os.path.abspath(os.path.dirname(__file__))
|
18 | 12 | SOURCE_DIR = os.path.dirname(TOP_DIR)
|
@@ -93,14 +87,25 @@ def setUp(self) -> None:
|
93 | 87 |
|
94 | 88 | def test_validVersion(self):
|
95 | 89 | outputFilePath = createJson.buildOutputFilePath(
|
96 |
| - data={ |
97 |
| - "addonId": "testId", |
98 |
| - "addonVersionNumber": { |
99 |
| - "major": 1, |
100 |
| - "minor": 2, |
101 |
| - "patch": 0, |
102 |
| - }, |
103 |
| - }, |
| 90 | + data=createJson.AddonData( |
| 91 | + addonId="addonId", |
| 92 | + displayName="Addon name", |
| 93 | + URL="https://example.com", |
| 94 | + description="Addon description", |
| 95 | + sha256="sha256checksum", |
| 96 | + addonVersionName="1.2.0", |
| 97 | + addonVersionNumber={"major": 1, "minor": 2, "patch": 0}, |
| 98 | + minNVDAVersion={"major": 2023, "minor": 1, "patch": 0}, |
| 99 | + lastTestedVersion={"major": 2023, "minor": 2, "patch": 0}, |
| 100 | + channel="stable", |
| 101 | + publisher="Name of addon author or organisation", |
| 102 | + sourceURL="https://example.com", |
| 103 | + license="GPL v2", |
| 104 | + homepage="https://example.com", |
| 105 | + licenseURL="https://www.gnu.org/licenses/gpl-2.0.html", |
| 106 | + submissionTime=createJson.getCurrentTime(), |
| 107 | + translations=[], |
| 108 | + ), |
104 | 109 | parentDir=self.outputDir,
|
105 | 110 | )
|
106 | 111 |
|
|
0 commit comments