Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_simple_dict(self):
self.assertEqual(self.EXPECTED_SIMPLE_DICT, vdf.loads(vdf.dumps(self.SIMPLE_DICT)))
def test_multikey_knode(self):
self.maxDiff = 80*80
self.assertEqual(self.EXPECTED_MULTIKEY_KNODE, vdf.loads(self.MULTIKEY_KNODE))
def test_multikey_kv(self):
self.assertEqual(self.EXPECTED_MULTIKEY_KV, vdf.loads(self.MULTIKEY_KV))
def test_array_dict(self):
self.assertEqual(self.EXPECTED_ARRAY_DICT, vdf.loads(vdf.dumps(self.ARRAY_DICT)))
def test_quoted(self):
self.assertEqual(self.EXPECTED_DICT, vdf.loads(self.QUOTED_VDF))
def test_comment_quoted(self):
self.assertEqual(self.EXPECTED_DICT, vdf.loads(self.COMMENT_QUOTED_VDF))
def test_unquoted(self):
self.assertEqual(self.EXPECTED_DICT, vdf.loads(self.UNQUOTED_VDF))
def _build_client_schema_specials(self):
schema = self.load()
cs = schema.client_url
special = {}
if not cs:
return special
req = steam.api.http_downloader(str(cs), timeout = STEAM_TIMEOUT)
try:
clients = steam.vdf.loads(req.download())["items_game"]
except:
return special
prefabs = clients.get("prefabs", {})
colors = clients.get("colors", {})
csitems = clients.get("items", {})
for sitem in schema:
sid = sitem.schema_id
item = csitems.get(str(sid))
clientstuff = {}
if not item:
continue
prefab = item.get("prefab", {})