Commit 869ed48d authored by Michal Čihař's avatar Michal Čihař

Add test for subproject

parent aaaf884b
......@@ -27,7 +27,7 @@ from django.conf import settings
import shutil
import os
from weblate.trans.models import (
Project,
Project, SubProject
)
......@@ -50,6 +50,19 @@ class RepoTestCase(TestCase):
web='http://weblate.org/'
)
def create_subproject(self):
'''
Creates test subproject.
'''
project = self.create_project()
return SubProject.objects.create(
name='Test',
slug='test',
project=project,
repo='git://github.com/nijel/weblate-test.git',
filemask='po/*.po',
)
class ProjectTest(RepoTestCase):
'''
......@@ -58,3 +71,12 @@ class ProjectTest(RepoTestCase):
def test_create(self):
project = self.create_project()
self.assertTrue(os.path.exists(project.get_path()))
class SubProjectTest(RepoTestCase):
'''
SubProject object testing.
'''
def test_create(self):
project = self.create_subproject()
self.assertTrue(os.path.exists(project.get_path()))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment