infrahub-testcontainers 1.4.9__py3-none-any.whl → 1.5.0b0__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.
@@ -1,4 +1,4 @@
1
- from datetime import datetime, timezone
1
+ from datetime import UTC, datetime
2
2
  from enum import Enum
3
3
  from typing import Any
4
4
 
@@ -27,7 +27,7 @@ class InfrahubResultContext(BaseModel):
27
27
 
28
28
  class InfrahubActiveMeasurementItem(BaseModel):
29
29
  definition: MeasurementDefinition
30
- start_time: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))
30
+ start_time: datetime = Field(default_factory=lambda: datetime.now(UTC))
31
31
  context: dict[str, Any] = Field(default_factory=dict)
32
32
 
33
33
 
@@ -1,6 +1,6 @@
1
1
  import hashlib
2
2
  import json
3
- from datetime import datetime, timezone
3
+ from datetime import UTC, datetime
4
4
  from types import TracebackType
5
5
  from typing import Any
6
6
 
@@ -35,7 +35,7 @@ class InfrahubPerformanceTest:
35
35
  self.env_vars = {}
36
36
  self.project_name = ""
37
37
  self.test_info = {}
38
- self.start_time = datetime.now(timezone.utc)
38
+ self.start_time = datetime.now(UTC)
39
39
  self.end_time: datetime | None = None
40
40
  self.results_url = results_url
41
41
  self.scraper_endpoint = ""
@@ -57,7 +57,7 @@ class InfrahubPerformanceTest:
57
57
 
58
58
  def finalize(self, session: pytest.Session) -> None:
59
59
  if self.initialized:
60
- self.end_time = datetime.now(timezone.utc)
60
+ self.end_time = datetime.now(UTC)
61
61
  self.extract_test_session_information(session)
62
62
  self.send_results()
63
63
 
@@ -129,7 +129,7 @@ class InfrahubPerformanceTest:
129
129
  if not exc_type and self.active_measurements:
130
130
  self.add_measurement(
131
131
  definition=self.active_measurements.definition,
132
- value=(datetime.now(timezone.utc) - self.active_measurements.start_time).total_seconds() * 1000,
132
+ value=(datetime.now(UTC) - self.active_measurements.start_time).total_seconds() * 1000,
133
133
  context=self.active_measurements.context,
134
134
  )
135
135
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: infrahub-testcontainers
3
- Version: 1.4.9
3
+ Version: 1.5.0b0
4
4
  Summary: Testcontainers instance for Infrahub to easily build integration tests
5
5
  License: Apache-2.0
6
6
  Author: OpsMill
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
17
  Requires-Dist: httpx (>=0.28.1,<0.29.0)
18
- Requires-Dist: prefect-client (==3.4.13)
18
+ Requires-Dist: prefect-client (==3.4.22)
19
19
  Requires-Dist: psutil
20
20
  Requires-Dist: pydantic (>=2.10.6,<3.0.0)
21
21
  Requires-Dist: pytest
@@ -7,11 +7,11 @@ infrahub_testcontainers/haproxy.cfg,sha256=QUkG2Xu-hKoknPOeYKAkBT_xJH6U9CfIS0DTM
7
7
  infrahub_testcontainers/helpers.py,sha256=rGEWIeUfDg4w1wJNCzTm7_H1oA58HaMSORjVlHw1aWA,4677
8
8
  infrahub_testcontainers/host.py,sha256=Z4_gGoGKKeM_HGVS7SdYL1FTNGyLBk8wzicdSKHpfmM,1486
9
9
  infrahub_testcontainers/measurements.py,sha256=gR-uTasSIFCXrwvnNpIpfsQIopKftT7pBiarCgIShaQ,2214
10
- infrahub_testcontainers/models.py,sha256=ASYyvl7d_WQz_i7y8-3iab9hwwmCl3OCJavqVbe8nXU,954
11
- infrahub_testcontainers/performance_test.py,sha256=hvwiy6tc_lWniYqGkqfOXVGAmA_IV15VOZqbiD9ezno,6149
10
+ infrahub_testcontainers/models.py,sha256=-TScLFW3V7SOe3eS1C8ANKmabpxGDTX5xu-V1pgtnbs,940
11
+ infrahub_testcontainers/performance_test.py,sha256=k14E0loMNuvhIJKEItbeKdbcOC0NBM-HhSe0RnVhJJo,6117
12
12
  infrahub_testcontainers/plugin.py,sha256=I3RuZQ0dARyKHuqCf0y1Yj731P2Mwf3BJUehRJKeWrs,5645
13
13
  infrahub_testcontainers/prometheus.yml,sha256=610xQEyj3xuVJMzPkC4m1fRnCrjGpiRBrXA2ytCLa54,599
14
- infrahub_testcontainers-1.4.9.dist-info/METADATA,sha256=lrDijfTjdUTA4kywyQt3LQ8SKQuC6VBIfaJPFENrmZY,1029
15
- infrahub_testcontainers-1.4.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
16
- infrahub_testcontainers-1.4.9.dist-info/entry_points.txt,sha256=gHOERdtVE0P8dYz6FHkn2KplpbXvCDJQnuWg_IP0-qQ,76
17
- infrahub_testcontainers-1.4.9.dist-info/RECORD,,
14
+ infrahub_testcontainers-1.5.0b0.dist-info/METADATA,sha256=Le6azJnwTg98Ch3N-vaZjHNNnyvx6_pT4plb2sA9mgs,1031
15
+ infrahub_testcontainers-1.5.0b0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
16
+ infrahub_testcontainers-1.5.0b0.dist-info/entry_points.txt,sha256=gHOERdtVE0P8dYz6FHkn2KplpbXvCDJQnuWg_IP0-qQ,76
17
+ infrahub_testcontainers-1.5.0b0.dist-info/RECORD,,