fix: format all code with black

and from now on should not deviate from that...
This commit is contained in:
Lance Edgar 2025-08-31 12:42:59 -05:00
parent 45dabce956
commit 33ac0e008e
17 changed files with 730 additions and 576 deletions

View file

@ -8,22 +8,24 @@ from wuttasync import util as mod
class TestDataDiffs(TestCase):
def test_source_missing_field(self):
source = {'foo': 'bar'}
target = {'baz': 'xyz', 'foo': 'bar'}
source = {"foo": "bar"}
target = {"baz": "xyz", "foo": "bar"}
self.assertRaises(KeyError, mod.data_diffs, source, target)
def test_target_missing_field(self):
source = {'foo': 'bar', 'baz': 'xyz'}
target = {'baz': 'xyz'}
self.assertRaises(KeyError, mod.data_diffs, source, target, fields=['foo', 'baz'])
source = {"foo": "bar", "baz": "xyz"}
target = {"baz": "xyz"}
self.assertRaises(
KeyError, mod.data_diffs, source, target, fields=["foo", "baz"]
)
def test_no_diffs(self):
source = {'foo': 'bar', 'baz': 'xyz'}
target = {'baz': 'xyz', 'foo': 'bar'}
source = {"foo": "bar", "baz": "xyz"}
target = {"baz": "xyz", "foo": "bar"}
self.assertFalse(mod.data_diffs(source, target))
def test_with_diffs(self):
source = {'foo': 'bar', 'baz': 'xyz'}
target = {'baz': 'xyz', 'foo': 'BAR'}
source = {"foo": "bar", "baz": "xyz"}
target = {"baz": "xyz", "foo": "BAR"}
result = mod.data_diffs(source, target)
self.assertEqual(result, ['foo'])
self.assertEqual(result, ["foo"])