Skip to content

Commit 4c8d569

Browse files
authored
Merge pull request #45 from stax-labs/feat/live_schema
feat(schema) use live schema
2 parents 30ee44b + e15c281 commit 4c8d569

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

staxapp/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Config:
3232
org_id = None
3333
auth = None
3434
expiration = None
35-
load_live_schema = False
35+
load_live_schema = True
3636

3737
platform = (sysinfo.platform(),)
3838
python_version = (sysinfo.python_version(),)

tests/test_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ def testInvalidStaxClient(self):
4343
with self.assertRaises(ValidationException):
4444
StaxClient("fake")
4545

46-
def testLoadLiveSchema(self):
46+
def testLoadOldSchema(self):
4747
"""
48-
Test loading live schema
48+
Test loading Old schema
4949
"""
5050
self.Config = Config
51-
self.Config.load_live_schema = True
51+
self.Config.load_live_schema = False
5252
client = StaxClient("accounts")
5353
self.assertTrue(client._initialized)
5454

@@ -100,7 +100,7 @@ def testStaxWrapper(self):
100100
json=response_dict,
101101
status=200,
102102
)
103-
response = self.account_client.CreateAccount(Name="Unit", AccountType="Test")
103+
response = self.account_client.CreateAccount(Name="Unit", AccountType="ab13a455-033f-4947-8393-641eefc3ba5e")
104104
self.assertEqual(response, response_dict)
105105

106106
@responses.activate

tests/test_contract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def testGetSchema(self):
4242
"""
4343
Test getting the default schema
4444
"""
45-
data = {"Name": "Unit", "AccountType": "Test"}
45+
data = {"Name": "Unit", "AccountType": "ab13a455-033f-4947-8393-641eefc3ba5e"}
4646
component = "accounts.CreateAccount"
4747
self.StaxContract.validate(data, component)
4848
schema = self.StaxContract.get_schema()

0 commit comments

Comments
 (0)