예제 #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)