def run_dry_run(self): try: sources = self._get_sources() except: pass print(json_repr(sources))
def main(self): """Run the command """ sourceService = SourceService() sourceFactory = SourceFactory() config = self.get_config() sources = sourceFactory.create_from_config(config) sourceService.validate(sources) print(json_repr(sources))
def test_json_repr__None(self): self.assertEqual('null', json_repr(None))
def test_json_repr__ObjectEnum(self): self.assertEqual('"a"', json_repr(objectEnum.a))
def test_json_repr__ObjectOher(self): self.assertIn('proxy(', json_repr(type("")))
def test_json_repr__Tupple(self): self.assertEqual('[1, 2]', json_repr((1, 2)))
def test_json_repr__ObjectDiff(self): self.assertIn('"b": 1', json_repr(objectDict())) self.assertIn('"c": 2', json_repr(objectDict()))
def test_json_repr__Dict(self): self.assertIn('"a": 1', json_repr({"b": 2, "a": 1})) self.assertIn('"b": 2', json_repr({"b": 2, "a": 1}))
def test_json_repr__List(self): self.assertEqual('[1, 2]', json_repr([1, 2]))
def test_json_repr__String(self): self.assertEqual('"foo\\"bar"', json_repr('foo"bar'))
def test_json_repr__Number(self): self.assertEqual('1.2', json_repr(1.2))