Skip to content

Commit 0c22cef

Browse files
author
chadcarlson
committed
build errors
1 parent 6adca53 commit 0c22cef

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ verify_ssl = true
66
[dev-packages]
77

88
[packages]
9-
platformshconfig = {path = "."}
9+
platformshconfig = {editable = true,path = "."}
1010
pytest = "*"
1111

1212
[requires]

Pipfile.lock

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

platformshconfig/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class Config:
102102
"""
103103
The routes definition array. Only available at runtime.
104104
"""
105-
_routesDef = []
105+
_routesDef = {}
106106

107107
"""
108108
The relationships definition array. Only available at runtime.
@@ -412,7 +412,7 @@ def has_relationship(self, relationship):
412412
True if the relationship is defined, False otherwise.
413413
414414
"""
415-
return relationship in self.relationshipsDef
415+
return relationship in self._relationshipsDef
416416

417417
def __getitem__(self, item):
418418
"""Reads an environment variable, taking the prefix into account.

tests/test_config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,17 @@ def test_inruntime_inbuild_phase_is_false(self):
8989
config = Config(self.mockEnvironmentBuild)
9090
self.assertFalse(config.in_runtime())
9191

92+
93+
9294
def test_load_routes_in_runtime_works(self):
9395

9496
config = Config(self.mockEnvironmentDeploy)
9597
routes = config.routes()
9698

9799
self.assertTrue(isinstance(routes, dict))
98100

101+
102+
99103
def test_load_routes_in_build_fails(self):
100104

101105
config = Config(self.mockEnvironmentBuild)

0 commit comments

Comments
 (0)