示例#1
0
    def tc(self):
        # configures test client
        response = MagicMock()
        response.json = self.root_json
        self.nc.request.return_value = response

        client = CoprClient(self.nc, self.root_url, no_config=True)
        client.post_init()

        return client
示例#2
0
文件: test_client.py 项目: 0-T-0/copr
    def tc(self):
        # configures test client
        response = MagicMock()
        response.json = self.root_json
        self.nc.request.return_value = response

        client = CoprClient(self.nc, self.root_url, no_config=True)
        client.post_init()

        return client
示例#3
0
    def test_post_init(self):
        tc = CoprClient(self.nc, self.root_url, no_config=True)
        # import ipdb; ipdb.set_trace()

        self.response.json = self.root_json
        self.nc.request.return_value = self.response

        tc.post_init()
        assert tc._post_init_done

        assert isinstance(tc.projects, ProjectHandle)
        assert isinstance(tc.project_chroots, ProjectChrootHandle)
示例#4
0
文件: test_client.py 项目: 0-T-0/copr
    def test_post_init(self):
        tc = CoprClient(self.nc, self.root_url, no_config=True)
        # import ipdb; ipdb.set_trace()

        self.response.json = self.root_json
        self.nc.request.return_value = self.response

        tc.post_init()
        assert tc._post_init_done

        assert isinstance(tc.projects, ProjectHandle)
        assert isinstance(tc.project_chroots, ProjectChrootHandle)