Source code for nkdsu.apps.vote.tests.test_local_data
import subprocess
from unittest import TestCase
from django.core.management import call_command
[docs]
class LocalDataTest(TestCase):
[docs]
def test_local_data_updated(self) -> None:
def status() -> str:
return subprocess.check_output(['git', 'status', '-s']).decode('utf-8')
initial_status = status()
call_command('update_local_data')
self.assertEqual(initial_status, status())