-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
73 additions
and
40 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from pathlib import Path | ||
|
||
APP_DIRECTORY = Path(__file__).parent | ||
RESOURCES_DIRECTORY = APP_DIRECTORY / "__resources__" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
import atoti as tt | ||
|
||
from app import SKELETON | ||
from app.util.skeleton import CONTRIBUTORS_COUNT | ||
|
||
from ..total_capacity import TOTAL_CAPACITY | ||
|
||
|
||
def test_session_inside_docker_container( | ||
session_inside_docker_container: tt.Session, | ||
) -> None: | ||
cube = session_inside_docker_container.cubes[SKELETON.cubes.STATION.key] | ||
result_df = cube.query(cube.measures[CONTRIBUTORS_COUNT]) | ||
assert result_df[CONTRIBUTORS_COUNT][0] > 0 | ||
skeleton = SKELETON.cubes.STATION | ||
cube = session_inside_docker_container.cubes[skeleton.key] | ||
result_df = cube.query(cube.measures[skeleton.measures.CAPACITY.key]) | ||
total_capacity = result_df[skeleton.measures.CAPACITY.name][0] | ||
assert total_capacity > 0, ( | ||
"There should be at least one station with one dock or more." | ||
) | ||
assert total_capacity != TOTAL_CAPACITY, ( | ||
"The data fetched from the external API should lead to a different capacity than the one of the local data since new stations have been created since the data was snapshotted." | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TOTAL_CAPACITY = 45_850 | ||
"""The expected total capacity of the system when using local data.""" |