Added test for correct git SHA

The default behavior of `fetch_git_sha` should be to fetch the SHA of the active branch - if any - and not the master branch.
This commit is contained in:
Antonis Kalipetis 2015-09-14 17:38:18 +03:00
parent 7393d39832
commit f19287da47
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ from __future__ import absolute_import
import os.path
import pytest
import subprocess
from django.conf import settings
@ -19,6 +20,9 @@ def test_fetch_git_sha():
assert result is not None
assert len(result) == 40
assert isinstance(result, six.string_types)
assert result == subprocess.check_output(
'git rev-parse --verify HEAD', shell=True, cwd=settings.PROJECT_ROOT
).strip()
def test_fetch_package_version():