Skip to content

Commit 1c56604

Browse files
committed
fixes test method name
1 parent 9eb5f73 commit 1c56604

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ config.on_dedicated()
6767
config.on_production()
6868
```
6969

70+
> **Note:**
71+
>
72+
> Platform.sh will no longer refer to its [99.99% uptime SLA product](https://platform.sh/solutions/) as "Enterprise", but rather as "Dedicated". Configuration Reader libraries have in turn been updated to include an `on_dedicated` method to replace `on_enterprise`. For now `on_enterprise` remains available. It now calls the new method and no breaking changes have been introduced.
73+
>
74+
> It is recommended that you update your projects to use `on_dedicated` as soon as possible, as `on_enterprise` will be removed in a future version of this library.
75+
7076
### Read environment variables
7177

7278
The following magic properties return the corresponding environment variable value. See the [Platform.sh documentation](https://docs.platform.sh/development/variables.html) for a description of each.

platformshconfig/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def on_production(self):
416416

417417
if not self.is_valid_platform() and not self.in_build():
418418
return False
419-
prod_branch = 'production' if self.on_enterprise() else 'master'
419+
prod_branch = 'production' if self.on_dedicated() else 'master'
420420
return self['BRANCH'] == prod_branch
421421

422422
def register_formatter(self, name, formatter):

tests/test_config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def test_upstream_routes_for_app_on_dedicated(self):
155155
self.assertTrue("https://www.master-7rqtwti-gcpjkefjk4wc2.us-2.platformsh.site/" in routes)
156156
self.assertEqual("https://www.{default}/", routes["https://www.master-7rqtwti-gcpjkefjk4wc2.us-2.platformsh.site/"]["original_url"])
157157

158-
def test_onenterprise_returns_true_on_enterprise(self):
158+
def test_ondedicated_returns_true_on_dedicated(self):
159159

160160
env = self.mockEnvironmentDeploy
161161
env['PLATFORM_MODE'] = 'enterprise'
@@ -165,7 +165,7 @@ def test_onenterprise_returns_true_on_enterprise(self):
165165
self.assertTrue(config.on_enterprise())
166166
self.assertTrue(config.on_dedicated())
167167

168-
def test_onenterprise_returns_false_on_standard(self):
168+
def test_ondedicated_returns_false_on_standard(self):
169169

170170
env = self.mockEnvironmentDeploy
171171

@@ -174,7 +174,7 @@ def test_onenterprise_returns_false_on_standard(self):
174174
self.assertFalse(config.on_enterprise())
175175
self.assertFalse(config.on_dedicated())
176176

177-
def test_onproduction_on_enterprise_prod_is_true(self):
177+
def test_onproduction_on_dedicated_prod_is_true(self):
178178

179179
env = self.mockEnvironmentDeploy
180180
env['PLATFORM_MODE'] = 'enterprise'
@@ -184,7 +184,7 @@ def test_onproduction_on_enterprise_prod_is_true(self):
184184

185185
self.assertTrue(config.on_production())
186186

187-
def test_onproduction_on_enterprise_stg_is_false(self):
187+
def test_onproduction_on_dedicated_stg_is_false(self):
188188

189189
env = self.mockEnvironmentDeploy
190190
env['PLATFORM_MODE'] = 'enterprise'

0 commit comments

Comments
 (0)