def test_from_json_full(self):
        config = Config.from_json({'input_layer_names': ['abc', 'def:3'],
                                   'output_layer_names': ['ghi:2', 'jkl']})

        self.assertEqual(config, Config(input_nodes=[NodeSpec(layer_name='abc'),
                                                     NodeSpec(layer_name='def', node_index=3)],
                                        output_nodes=[NodeSpec(layer_name='ghi', node_index=2),
                                                      NodeSpec(layer_name='jkl')]))
    def test_from_json_output_names_only(self):
        config = Config.from_json({'output_layer_names': ['abc', 'def:3']})

        self.assertEqual(
            config,
            Config(input_nodes=None,
                   output_nodes=[
                       NodeSpec(layer_name='abc'),
                       NodeSpec(layer_name='def', node_index=3)
                   ]))
    def test_from_json_minimal(self):
        config = Config.from_json({})

        self.assertEqual(config, Config(input_nodes=None, output_nodes=None))