Commit 4dbbc50cbb6fad0efb83634cb8448ef794967c71
Committed by
Sergio Oliveira
1 parent
e460fd68
Exists in
master
and in
39 other branches
Fix tests
Showing
2 changed files
with
5 additions
and
6 deletions
Show diff stats
colab/proxy/gitlab/search_indexes.py
colab/proxy/gitlab/tests/test_gitlab.py
| ... | ... | @@ -2,13 +2,14 @@ |
| 2 | 2 | Test User class. |
| 3 | 3 | Objective: Test parameters, and behavior. |
| 4 | 4 | """ |
| 5 | +from datetime import datetime | |
| 6 | + | |
| 7 | + | |
| 5 | 8 | from django.test import TestCase, Client |
| 6 | 9 | from colab.accounts.models import User |
| 7 | 10 | from colab.proxy.gitlab.models import GitlabProject, \ |
| 8 | 11 | GitlabIssue, GitlabComment, GitlabMergeRequest |
| 9 | 12 | |
| 10 | -from datetime import datetime | |
| 11 | - | |
| 12 | 13 | |
| 13 | 14 | class GitlabTest(TestCase): |
| 14 | 15 | |
| ... | ... | @@ -54,7 +55,6 @@ class GitlabTest(TestCase): |
| 54 | 55 | g.name = "colab" |
| 55 | 56 | g.name_with_namespace = "Software Public / Colab" |
| 56 | 57 | g.path_with_namespace = "softwarepublico/colab" |
| 57 | - g.modified = datetime.now() | |
| 58 | 58 | g.created_at = datetime.now() |
| 59 | 59 | g.last_activity_at = datetime.now() |
| 60 | 60 | g.save() |
| ... | ... | @@ -65,7 +65,7 @@ class GitlabTest(TestCase): |
| 65 | 65 | mr.title = "Include plugin support" |
| 66 | 66 | mr.description = "Merge request for plugin support" |
| 67 | 67 | mr.state = "Closed" |
| 68 | - mr.modified = datetime.now() | |
| 68 | + mr.created_at = datetime.now() | |
| 69 | 69 | mr.update_user(self.user.username) |
| 70 | 70 | mr.save() |
| 71 | 71 | |
| ... | ... | @@ -74,7 +74,7 @@ class GitlabTest(TestCase): |
| 74 | 74 | i.project = g |
| 75 | 75 | i.title = "Issue for colab" |
| 76 | 76 | i.description = "Issue reported to colab" |
| 77 | - i.modified = datetime.now() | |
| 77 | + i.created_at = datetime.now() | |
| 78 | 78 | i.state = "Open" |
| 79 | 79 | i.update_user(self.user.username) |
| 80 | 80 | i.save() | ... | ... |