Exemplo n.º 1
0
    def test_commit_committer(self):
        today = datetime.today()
        GitlabLoader().sync(today, today)

        commit = GitCommit.objects.filter(
            hash='3da541559918a808c2402bba5012f6c60b27661c').first()
        assert commit, commit

        assert commit.committer_profile, commit.committer_profile
        assert commit.committer_profile.id == self.dev2.id, commit.committer_profile
Exemplo n.º 2
0
    def test_unknown_committers(self):
        today = datetime.today()
        GitlabLoader().sync(today, today)

        commit = GitCommit.objects.filter(
            hash='b75013a2ab5822b00e7ada00389c69f4ea565f68').first()
        assert commit, commit

        assert commit.committer_profile is None
        assert commit.author_profile is None
Exemplo n.º 3
0
 def handle(self, *args, **options):
     schedules = GitlabLoader().get_pipeline_schedules(
         options['project_id'])
     self.send_message(schedules, options)
Exemplo n.º 4
0
 def handle_dates(self, from_date, to_date, options):
     GitlabLoader().sync(from_date, to_date)
Exemplo n.º 5
0
    def test_import_commits_created(self):
        today = datetime.today()
        GitlabLoader().sync(today, today)

        count = GitCommit.objects.all().count()
        assert count == 3, count