aplos-nca-saas-sdk 0.0.6__py3-none-any.whl → 0.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,7 +55,25 @@ class IntegrationTestBase:
55
55
  """
56
56
  Returns True if all tests in the suite were successful
57
57
  """
58
- return all([result.success for result in self.results])
58
+ return all([result.error is None for result in self.results])
59
+
60
+ def skipped_count(self) -> int:
61
+ """
62
+ Gets the number of tests that were skipped
63
+ """
64
+ return len([result for result in self.results if result.skipped])
65
+
66
+ def error_count(self) -> int:
67
+ """
68
+ Gets the number of tests that resulted in an error
69
+ """
70
+ return len([result for result in self.results if result.error is not None])
71
+
72
+ def errors(self) -> List[str]:
73
+ """
74
+ Gets the list of errors that occurred during the test
75
+ """
76
+ return [result.error for result in self.results if result.error is not None]
59
77
 
60
78
  def test(self) -> bool:
61
79
  """
@@ -42,9 +42,10 @@ class IntegrationTestSuite:
42
42
  test.config = test_config
43
43
  test_result: Dict[str, Any] = {
44
44
  "test_name": test.name,
45
- "success": True,
46
- "error": None,
47
- "skipped": False,
45
+ "success": 0,
46
+ "errors": [],
47
+ "skipped_count": 0,
48
+ "error_count": 0,
48
49
  "start_time_utc": None,
49
50
  "end_time_utc": None,
50
51
  }
@@ -55,10 +56,17 @@ class IntegrationTestSuite:
55
56
  success = test.test()
56
57
  test_result["success"] = success
57
58
  test_result["results"] = test.results
59
+ test_result["skipped_count"] = test.skipped_count()
60
+ test_result["error_count"] = test.error_count()
61
+ test_result["errors"] = test.errors()
62
+ if not success:
63
+ if self.fail_fast:
64
+ # just break and let the failure routine handle it
65
+ break
58
66
 
59
67
  except Exception as e: # pylint: disable=broad-except
60
68
  test_result["success"] = False
61
- test_result["error"] = str(e)
69
+ test_result["errors"] = [str(e)]
62
70
  if self.fail_fast:
63
71
  # just break and let the failure routine handle it
64
72
  break
@@ -72,7 +80,7 @@ class IntegrationTestSuite:
72
80
  else:
73
81
  logger.error(test_result)
74
82
  # find the failures
75
- failures = [test for test in self.test_results if not test["success"]]
83
+ failures = [test for test in self.test_results if len(test["errors"]) > 0]
76
84
  self.__print_results(start_time, failures)
77
85
 
78
86
  # print the results
@@ -86,19 +94,19 @@ class IntegrationTestSuite:
86
94
 
87
95
  def __print_results(self, start_time: datetime, failures: List[Dict[str, Any]]):
88
96
  print("Test Results:")
97
+ skipped = sum([test["skipped_count"] for test in self.test_results])
98
+
89
99
  for test_result in self.test_results:
90
100
  duration = test_result["end_time_utc"] - test_result["start_time_utc"]
91
101
  print(
92
102
  f" {test_result['test_name']} {'succeeded' if test_result['success'] else 'failed'} duration: {duration}"
93
103
  )
94
104
  if not test_result["success"]:
95
- print(f" Error: {test_result['error']}")
105
+ print(f" Error: {test_result['errors']}")
96
106
 
97
107
  print(f"Test Suite completed in {datetime.now(UTC) - start_time}")
98
108
 
99
- print(f"Total Tests: {len(self.test_results)}")
100
- print(f"Successful Tests: {len(self.test_results) - len(failures)}")
101
- print(f"Failed Tests: {len(failures)}")
102
- print(
103
- f"Skipped Tests: {len([test for test in self.test_results if test['skipped']])}"
104
- )
109
+ print(f" Total Tests: {len(self.test_results)}")
110
+ print(f" Successful: {len(self.test_results) - len(failures) - skipped}")
111
+ print(f" Skipped: {skipped}")
112
+ print(f" Failed: {len(failures)}")
@@ -29,12 +29,16 @@ def main():
29
29
 
30
30
  # normally we'd pull a test configuration file from Secrets Manager, Parameter Store, or some other secure location
31
31
  # here we're going to pull the sample file and then override some it's values.
32
- config_file = os.path.join(Path(__file__).parent, "configs", "config_sample.json")
32
+ config_file = os.path.join(
33
+ Path(__file__).parent,
34
+ "configs",
35
+ os.getenv("TEST_CONFIG_FILE") or "config_sample.json",
36
+ )
33
37
  # load it so we can see what it looks like
34
38
  config.load(file_path=config_file)
35
39
 
36
40
  # override the configuration
37
- override_config(config)
41
+ # override_config(config)
38
42
 
39
43
  its.test(test_config=config)
40
44
 
@@ -31,6 +31,7 @@ class TestAppLogin(IntegrationTestBase):
31
31
  test_response.name = self.name
32
32
  if not login.enabled or not self.config.logins.enabled:
33
33
  test_response.skipped = True
34
+ test_response.success = True
34
35
  self.results.append(test_response)
35
36
  continue
36
37
  try:
@@ -1,4 +1,4 @@
1
1
  # Aplos NCA SaaS SDK Version File
2
2
  # This is automatically generated during the build process.
3
3
  # DO NOT UPDATE IT DIRECTLY. IT WILL BE OVERWRITTEN.
4
- __version__ = '0.0.6'
4
+ __version__ = '0.0.7'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: aplos_nca_saas_sdk
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: Aplos NCA SaaS SDK
5
5
  Project-URL: Homepage, https://aplosanalytics.com/
6
6
  Project-URL: Documentation, https://docs.aplosanalytics.com/
@@ -1,17 +1,17 @@
1
1
  aplos_nca_saas_sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- aplos_nca_saas_sdk/version.py,sha256=DHvdN6l39RUqrAnGfx8PwpFxsXPlEjWYlNsEZWFzU-0,171
2
+ aplos_nca_saas_sdk/version.py,sha256=gi0vhsV8WHn6oKq4bvVoLyN2_ie7vnLhB7uetAG-FWI,171
3
3
  aplos_nca_saas_sdk/aws_resources/aws_cognito.py,sha256=pxyEdIoeeT7of_hjxYlplOnyLQpo3I-dnc5mHeGP47c,6427
4
4
  aplos_nca_saas_sdk/aws_resources/aws_s3_presigned_payload.py,sha256=rbTaeUgPpRsw1KV0YjnmkD5sQvlYet9XBj6Ie7nXz5Y,1987
5
5
  aplos_nca_saas_sdk/aws_resources/aws_s3_presigned_upload.py,sha256=WK7CKzuHcgU15k2BWiBqSZ8UdQSVSo39L8Las-7gvC0,3940
6
6
  aplos_nca_saas_sdk/files/analysis_files/single_ev/configuration_single_ev.json,sha256=lLnRV0jwzaSn32D8NlOekOF5oGFfUwugUlvlwoKz540,986
7
7
  aplos_nca_saas_sdk/files/analysis_files/single_ev/meta_data.json,sha256=p1KYOAe5Cl3rjtfF1t96oRG-QtFJJCo9otReRPNtvIk,447
8
8
  aplos_nca_saas_sdk/files/analysis_files/single_ev/single_ev.csv,sha256=qFSAlgLOmERsabMmp1X6PAZa-8yFthZlHacM_f7_AOY,6528
9
- aplos_nca_saas_sdk/integration_testing/integration_test_base.py,sha256=UOwfhcgX3YrDRfKhxemTo2gKNCJVzZ4RT-RMMDhzozI,2008
9
+ aplos_nca_saas_sdk/integration_testing/integration_test_base.py,sha256=RK2UIBoPu_Ytum0DgwIkZyHmAJ0fCvZ9rHJ5XHwsaoY,2609
10
10
  aplos_nca_saas_sdk/integration_testing/integration_test_configurations.py,sha256=ZE-Yqm8v7QPOPENmcVIksniFhikndHWVB21HkQspupE,1100
11
11
  aplos_nca_saas_sdk/integration_testing/integration_test_factory.py,sha256=NNDmBlDNPJWylXeygiXMyIGl29-DykZ8btx4a6RwjiY,2089
12
12
  aplos_nca_saas_sdk/integration_testing/integration_test_response.py,sha256=T5cLdrhN9Dncu3SFZ3JpUnpQGGJ_VpvTO3uEz0KjfY0,814
13
- aplos_nca_saas_sdk/integration_testing/integration_test_suite.py,sha256=r91p9Nz_cffgc2PJy_9nou9nJxY9ya8GyjzhyieGbGE,3806
14
- aplos_nca_saas_sdk/integration_testing/main.py,sha256=5vY3CHhQeGgCZW28fz5lhsM5zpNXrmnvLn0kU8AjLPc,1985
13
+ aplos_nca_saas_sdk/integration_testing/integration_test_suite.py,sha256=rC9ktbS7wX8HRKQANOz_4M1iM7U-v0vfY3-nm4TJMWU,4211
14
+ aplos_nca_saas_sdk/integration_testing/main.py,sha256=n2q5NPqM6BwQy-qKHYs4WJV9n3YYZqtg_TTX5JHaV5I,2051
15
15
  aplos_nca_saas_sdk/integration_testing/readme.md,sha256=sX-_gzx17UUF-ZqvCWq0R5zcqgOMC4JjQKnjgxQH9vM,629
16
16
  aplos_nca_saas_sdk/integration_testing/configs/_config_base.py,sha256=O48Y1r8JFe2KvSMTY5EttZAz1-hQsU6-Su6CzDUKDmE,347
17
17
  aplos_nca_saas_sdk/integration_testing/configs/app_settings.py,sha256=qq04xPowq4-4EY0Cf8zzVqmgUfrHk3RAtHOOcyFifEw,2618
@@ -19,7 +19,7 @@ aplos_nca_saas_sdk/integration_testing/configs/config_sample.json,sha256=50tqWe9
19
19
  aplos_nca_saas_sdk/integration_testing/configs/login.py,sha256=DGcjH4WuyG0oPxdIJBi3qpymzGaLEJjCoRfbQT0PcK4,3002
20
20
  aplos_nca_saas_sdk/integration_testing/tests/app_configuration_test.py,sha256=rayFz4YcSpBVXr9aZYQSncBg7ohdYjEZpxIc1P7vrNA,1568
21
21
  aplos_nca_saas_sdk/integration_testing/tests/app_execution_test.py,sha256=bDyVvtOKSJdy0sdCVYVuCdUrQYhn8D3peCmM1OCkSVg,145
22
- aplos_nca_saas_sdk/integration_testing/tests/app_login_test.py,sha256=7aid5Fz9Je8e3zAVg-vl_DEC3-vBzPXgLJ2EVhUeFZc,1637
22
+ aplos_nca_saas_sdk/integration_testing/tests/app_login_test.py,sha256=yCuJzNyQmm_yq7Olt4P-Wrher697fsElI8J8G87f0fU,1682
23
23
  aplos_nca_saas_sdk/integration_testing/tests/app_validation_test.py,sha256=bDyVvtOKSJdy0sdCVYVuCdUrQYhn8D3peCmM1OCkSVg,145
24
24
  aplos_nca_saas_sdk/nca_resources/nca_app_configuration.py,sha256=mRK_OK2k0q4o4pH11tpeR3yKve7sgw3XTtQ0HG9KKFU,1877
25
25
  aplos_nca_saas_sdk/nca_resources/nca_endpoints.py,sha256=8jQK8mniRFaQaGnpG1g_D0si8HCJciVvcLA6wFtOers,2026
@@ -29,7 +29,7 @@ aplos_nca_saas_sdk/utilities/commandline_args.py,sha256=WKIPNKMMMpEk580xXMQY7sGw
29
29
  aplos_nca_saas_sdk/utilities/environment_services.py,sha256=K6xnxDb9eNdmjJZKPW0JfmmV9rGGwm2urlxCBZwxMMs,2272
30
30
  aplos_nca_saas_sdk/utilities/environment_vars.py,sha256=pfcfX2eYmwYrmY-PZIHCONU9ds_-6GZmb-JibGROJGI,812
31
31
  aplos_nca_saas_sdk/utilities/http_utility.py,sha256=7VGWeSOuJbjnUQkzNA6cquKv0g2FJoHsBnDSgE2Buic,696
32
- aplos_nca_saas_sdk-0.0.6.dist-info/METADATA,sha256=wkxK4Uynln-5Dpg4j4aw28Kvc1EsghyrGkmZLWB1aTU,3769
33
- aplos_nca_saas_sdk-0.0.6.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
34
- aplos_nca_saas_sdk-0.0.6.dist-info/licenses/LICENSE,sha256=pAZXnNE2dxxwXFIduGyn1gpvPefJtUYOYZOi3yeGG94,1068
35
- aplos_nca_saas_sdk-0.0.6.dist-info/RECORD,,
32
+ aplos_nca_saas_sdk-0.0.7.dist-info/METADATA,sha256=K6OfyfXLDJ7o_tmNXE5D-OPU1npuJGayE6qoBzCUcw0,3769
33
+ aplos_nca_saas_sdk-0.0.7.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
34
+ aplos_nca_saas_sdk-0.0.7.dist-info/licenses/LICENSE,sha256=pAZXnNE2dxxwXFIduGyn1gpvPefJtUYOYZOi3yeGG94,1068
35
+ aplos_nca_saas_sdk-0.0.7.dist-info/RECORD,,