Пример #1
0
    def run_dry_run(self):
        try:
            sources = self._get_sources()
        except:
            pass

        print(json_repr(sources))
Пример #2
0
    def run_dry_run(self):
        try:
            sources = self._get_sources()
        except:
            pass

        print(json_repr(sources))
Пример #3
0
    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))
Пример #4
0
 def test_json_repr__None(self):
     self.assertEqual('null', json_repr(None))
Пример #5
0
 def test_json_repr__ObjectEnum(self):
     self.assertEqual('"a"', json_repr(objectEnum.a))
Пример #6
0
 def test_json_repr__ObjectOher(self):
     self.assertIn('proxy(', json_repr(type("")))
Пример #7
0
 def test_json_repr__Tupple(self):
     self.assertEqual('[1, 2]', json_repr((1, 2)))
Пример #8
0
 def test_json_repr__ObjectDiff(self):
     self.assertIn('"b": 1', json_repr(objectDict()))
     self.assertIn('"c": 2', json_repr(objectDict()))
Пример #9
0
 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}))
Пример #10
0
 def test_json_repr__List(self):
     self.assertEqual('[1, 2]', json_repr([1, 2]))
Пример #11
0
 def test_json_repr__String(self):
     self.assertEqual('"foo\\"bar"', json_repr('foo"bar'))
Пример #12
0
 def test_json_repr__String(self):
     self.assertEqual('"foo\\"bar"', json_repr('foo"bar'))
Пример #13
0
 def test_json_repr__None(self):
     self.assertEqual('null', json_repr(None))
Пример #14
0
 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}))
Пример #15
0
 def test_json_repr__ObjectOher(self):
     self.assertIn('proxy(', json_repr(type("")))
Пример #16
0
 def test_json_repr__ObjectEnum(self):
     self.assertEqual('"a"', json_repr(objectEnum.a))
Пример #17
0
 def test_json_repr__ObjectDiff(self):
     self.assertIn('"b": 1', json_repr(objectDict()))
     self.assertIn('"c": 2', json_repr(objectDict()))
Пример #18
0
 def test_json_repr__Tupple(self):
     self.assertEqual('[1, 2]', json_repr((1, 2)))
Пример #19
0
 def test_json_repr__List(self):
     self.assertEqual('[1, 2]', json_repr([1, 2]))
Пример #20
0
 def test_json_repr__Number(self):
     self.assertEqual('1.2', json_repr(1.2))
Пример #21
0
 def test_json_repr__Number(self):
     self.assertEqual('1.2', json_repr(1.2))