def test_config_from_init(self):
        """Test credentials instantiation from JSON file, with config."""
        inst = PIDClientCredentials(handle_server_url=self.url,
                                    username=self.user,
                                    password=self.randompassword,
                                    foo='bar',
                                    bar='baz')

        self.assertEqual(inst.get_config()['foo'], 'bar',
            'Config not the same as in json file.')

        self.assertEqual(inst.get_config()['bar'], 'baz',
            'Config not the same as in json file.')
Ejemplo n.º 2
0
    def test_config_from_init(self):
        """Test credentials instantiation from JSON file, with config."""
        inst = PIDClientCredentials(self.url,
                                    self.user,
                                    self.randompassword,
                                    foo='bar',
                                    bar='baz')

        self.assertEqual(inst.get_config()['foo'], 'bar',
            'Config not the same as in json file.')

        self.assertEqual(inst.get_config()['bar'], 'baz',
            'Config not the same as in json file.')