def setUp(self):

        super(TestCallbacks, self).setUp()

        self.project = ProjectFactory()
        self.consolidated_auth = Auth(self.project.creator)
        self.project.creator.save()
        self.non_authenticator = UserFactory()
        self.non_authenticator.save()
        self.project.save()
        self.project.add_contributor(
            contributor=self.non_authenticator,
            auth=self.consolidated_auth,
        )

        self.project.add_addon('github', auth=self.consolidated_auth)
        self.project.creator.add_addon('github')
        self.external_account = factories.GitHubAccountFactory()
        self.project.creator.external_accounts.add(self.external_account)
        self.project.creator.save()
        self.node_settings = self.project.get_addon('github')
        self.user_settings = self.project.creator.get_addon('github')
        self.node_settings.user_settings = self.user_settings
        self.node_settings.user = '******'
        self.node_settings.repo = 'Sheer-Heart-Attack'
        self.node_settings.external_account = self.external_account
        self.node_settings.save()
        self.node_settings.set_auth
        self.user_settings.oauth_grants[self.project._id] = {
            self.external_account._id: []
        }
        self.user_settings.save()
 def setUp(self):
     super(TestGithubNodeSettings, self).setUp()
     self.user = UserFactory()
     self.user.add_addon('github')
     self.user_settings = self.user.get_addon('github')
     self.external_account = factories.GitHubAccountFactory()
     self.user_settings.owner.external_accounts.add(self.external_account)
     self.user_settings.owner.save()
     self.node_settings = factories.GitHubNodeSettingsFactory(
         user_settings=self.user_settings)