예제 #1
0
    def setUp(self):
        super(TestGitLabViews, self).setUp()
        self.user = AuthUserFactory()
        self.consolidated_auth = Auth(user=self.user)

        self.project = ProjectFactory(creator=self.user)
        self.non_authenticator = UserFactory()
        self.project.add_contributor(
            contributor=self.non_authenticator,
            auth=self.consolidated_auth,
        )
        self.project.save()
        self.project.add_addon('gitlab', auth=self.consolidated_auth)
        self.project.creator.add_addon('gitlab')
        self.project.creator.external_accounts.add(GitLabAccountFactory())
        self.project.creator.save()

        self.gitlab = create_mock_gitlab(user='******', private=False)

        self.node_settings = self.project.get_addon('gitlab')
        self.node_settings.user_settings = self.project.creator.get_addon(
            'gitlab')
        # Set the node addon settings to correspond to the values of the mock repo
        self.node_settings.user = '******'
        self.node_settings.repo = 'mock-repo'
        self.node_settings.repo_id = 1748448
        self.node_settings.save()
예제 #2
0
    def setUp(self):
        super(TestGitLabViews, self).setUp()
        self.user = AuthUserFactory()
        self.consolidated_auth = Auth(user=self.user)

        self.project = ProjectFactory(creator=self.user)
        self.non_authenticator = UserFactory()
        self.project.add_contributor(
            contributor=self.non_authenticator,
            auth=self.consolidated_auth,
        )
        self.project.save()
        self.project.add_addon('gitlab', auth=self.consolidated_auth)
        self.project.creator.add_addon('gitlab')
        self.project.creator.external_accounts.add(GitLabAccountFactory())
        self.project.creator.save()

        self.gitlab = create_mock_gitlab(user='******', private=False)

        self.node_settings = self.project.get_addon('gitlab')
        self.node_settings.user_settings = self.project.creator.get_addon('gitlab')
        # Set the node addon settings to correspond to the values of the mock repo
        self.node_settings.user = '******'
        self.node_settings.repo = 'mock-repo'
        self.node_settings.repo_id = 1748448
        self.node_settings.save()
예제 #3
0
 def setUp(self):
     super(TestCRUD, self).setUp()
     self.gitlab = create_mock_gitlab(user='******', private=False)
     self.user = AuthUserFactory()
     self.consolidated_auth = Auth(user=self.user)
     self.project = ProjectFactory(creator=self.user)
     self.project.add_addon('gitlab', auth=self.consolidated_auth)
     self.project.creator.add_addon('gitlab')
     self.node_settings = self.project.get_addon('gitlab')
     self.node_settings.user_settings = self.project.creator.get_addon('gitlab')
     # Set the node addon settings to correspond to the values of the mock repo
     self.node_settings.user = self.gitlab.repo.return_value.owner.login
     self.node_settings.repo = self.gitlab.repo.return_value.name
     self.node_settings.save()
예제 #4
0
 def setUp(self):
     super(TestCRUD, self).setUp()
     self.gitlab = create_mock_gitlab(user='******', private=False)
     self.user = AuthUserFactory()
     self.consolidated_auth = Auth(user=self.user)
     self.project = ProjectFactory(creator=self.user)
     self.project.add_addon('gitlab', auth=self.consolidated_auth)
     self.project.creator.add_addon('gitlab')
     self.node_settings = self.project.get_addon('gitlab')
     self.node_settings.user_settings = self.project.creator.get_addon(
         'gitlab')
     # Set the node addon settings to correspond to the values of the mock repo
     self.node_settings.user = self.gitlab.repo.return_value.owner.login
     self.node_settings.repo = self.gitlab.repo.return_value.name
     self.node_settings.save()
예제 #5
0
    def setUp(self):

        super(TestGitLabSettings, self).setUp()
        self.gitlab = create_mock_gitlab(user='******', private=False)
        self.project = ProjectFactory()
        self.auth = self.project.creator.auth
        self.consolidated_auth = Auth(user=self.project.creator)

        self.project.add_addon('gitlab', auth=self.consolidated_auth)
        self.project.creator.add_addon('gitlab')
        self.node_settings = self.project.get_addon('gitlab')
        self.user_settings = self.project.creator.get_addon('gitlab')
        self.node_settings.user_settings = self.user_settings
        self.node_settings.user = '******'
        self.node_settings.repo = 'Sheer-Heart-Attack'
        self.node_settings.repo_id = 'sheer-heart-attack'
        self.node_settings.save()
예제 #6
0
    def setUp(self):

        super(TestGitLabSettings, self).setUp()
        self.gitlab = create_mock_gitlab(user='******', private=False)
        self.project = ProjectFactory()
        self.auth = self.project.creator.auth
        self.consolidated_auth = Auth(user=self.project.creator)

        self.project.add_addon('gitlab', auth=self.consolidated_auth)
        self.project.creator.add_addon('gitlab')
        self.node_settings = self.project.get_addon('gitlab')
        self.user_settings = self.project.creator.get_addon('gitlab')
        self.node_settings.user_settings = self.user_settings
        self.node_settings.user = '******'
        self.node_settings.repo = 'Sheer-Heart-Attack'
        self.node_settings.repo_id = 'sheer-heart-attack'
        self.node_settings.save()