From 037319670773d918e257af3d9862074a8672e3c4 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Thu, 24 Jan 2019 18:45:52 -0500 Subject: [PATCH] max_key_fee is plain YAML now --- lbrynet/conf.py | 3 --- tests/unit/test_conf.py | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lbrynet/conf.py b/lbrynet/conf.py index 0fc55cadc..077a62155 100644 --- a/lbrynet/conf.py +++ b/lbrynet/conf.py @@ -136,9 +136,6 @@ class MaxKeyFee(Setting[dict]): if currency not in CURRENCIES: raise InvalidCurrencyError(currency) - serialize = staticmethod(json.dumps) - deserialize = staticmethod(json.loads) - class Servers(Setting[list]): diff --git a/tests/unit/test_conf.py b/tests/unit/test_conf.py index 50c50cf82..8721f728a 100644 --- a/tests/unit/test_conf.py +++ b/tests/unit/test_conf.py @@ -155,7 +155,7 @@ class ConfigurationTests(unittest.TestCase): with tempfile.TemporaryDirectory() as temp_dir: config = os.path.join(temp_dir, 'settings.yml') with open(config, 'w') as fd: - fd.write('max_key_fee: \'{"currency":"USD", "amount":1}\'\n') + fd.write('max_key_fee: {currency: USD, amount: 1}\n') c = Config.create_from_arguments( types.SimpleNamespace(config=config) ) @@ -166,4 +166,4 @@ class ConfigurationTests(unittest.TestCase): with c.update_config(): c.max_key_fee = {'currency': 'BTC', 'amount': 1} with open(config, 'r') as fd: - self.assertEqual(fd.read(), 'max_key_fee: \'{"currency": "BTC", "amount": 1}\'\n') + self.assertEqual(fd.read(), 'max_key_fee:\n amount: 1\n currency: BTC\n')