Skip to content

Commit

Permalink
minor: 单元测试问题处理 TencentBlueKing#275
Browse files Browse the repository at this point in the history
  • Loading branch information
pagezz-canway committed May 28, 2019
1 parent 71d5805 commit 3125638
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions gcloud/tests/external_plugins/models/test_sync_task.py
Expand Up @@ -14,15 +14,19 @@
from django.test import TestCase

from django.utils.translation import ugettext_lazy as _

from gcloud.tests.external_plugins.mock import * # noqa
from gcloud.tests.external_plugins.mock_settings import * # noqa
from gcloud.external_plugins.models import SyncTask, FAILED


class TestSyncTaskModel(TestCase):
def setUp(self):
self.sync_task = SyncTask.objects.create(
creator='user1',
create_method='manual'
)
with patch(GCLOUD_EXTERNAL_PLUGINS_SYNC_TASK_DELAY, MagicMock()):
self.sync_task = SyncTask.objects.create(
creator='user1',
create_method='manual'
)

def tearDown(self):
SyncTask.objects.all().delete()
Expand Down

0 comments on commit 3125638

Please sign in to comment.