From bf3a75cfbb5c66a2840685d73b2c17b9fbf4cd84 Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Fri, 11 Feb 2022 12:17:48 -0500 Subject: [PATCH] Added test --- tests/test_git_service.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test_git_service.py b/tests/test_git_service.py index 14549a63..5fd11a76 100644 --- a/tests/test_git_service.py +++ b/tests/test_git_service.py @@ -1,5 +1,6 @@ from tests.base_test import BaseTest +from crc import app from crc.services.git_service import GitService from unittest.mock import patch, Mock, call @@ -57,6 +58,10 @@ class TestGitService(BaseTest): self.assertIn(call.index.commit('This is my comment'), method_calls) self.assertIn(call.remotes.origin.push(), method_calls) - # def test_pull_from_remote(self): - # result = GitService.pull_from_remote() - # print(result) + def test_get_remote_url(self): + app.config['GIT_REMOTE_SERVER'] = 'test_server.com' + app.config['GIT_USER_NAME'] = 'test_username' + app.config['GIT_USER_PASS'] = 'test_pass' + + result = GitService.get_remote_url('my_test_path') + self.assertEqual('https://test_username:test_pass@test_server.com/my_test_path.git', result)