Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
869ed48d
Commit
869ed48d
authored
Jan 18, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for subproject
parent
aaaf884b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
weblate/trans/tests/test_models.py
weblate/trans/tests/test_models.py
+23
-1
No files found.
weblate/trans/tests/test_models.py
View file @
869ed48d
...
...
@@ -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
()))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment