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
9f3f5fb3
Commit
9f3f5fb3
authored
Nov 14, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify mail sending for new language subscription
parent
9425b577
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
trans/tests/test_views.py
trans/tests/test_views.py
+12
-0
No files found.
trans/tests/test_views.py
View file @
9f3f5fb3
...
...
@@ -26,6 +26,8 @@ from django.test.client import RequestFactory
from
django.contrib.auth.models
import
User
from
django.core.urlresolvers
import
reverse
from
django.contrib.messages.storage.fallback
import
FallbackStorage
from
django.core
import
mail
from
django.conf
import
settings
from
trans.models.changes
import
Change
from
trans.models.unitdata
import
Suggestion
from
trans.tests.test_models
import
RepoTestCase
...
...
@@ -200,6 +202,9 @@ class NewLangTest(ViewTestCase):
self
.
assertContains
(
response
,
'http://example.com/instructions'
)
def
test_contact
(
self
):
# Hack to allow sending of mails
settings
.
ADMINS
=
((
'Weblate test'
,
'noreply@weblate.org'
),
)
self
.
project
.
new_lang
=
'contact'
self
.
project
.
save
()
...
...
@@ -218,6 +223,13 @@ class NewLangTest(ViewTestCase):
self
.
subproject
.
get_absolute_url
()
)
# Verify mail
self
.
assertEqual
(
len
(
mail
.
outbox
),
1
)
self
.
assertEqual
(
mail
.
outbox
[
0
].
subject
,
'[Weblate] New language request in Test/Test'
,
)
def
test_add
(
self
):
self
.
project
.
new_lang
=
'add'
self
.
project
.
save
()
...
...
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