Ver código fonte

Use algoo version of tgapp-resetpassword

Bastien Sevajol (Algoo) 7 anos atrás
pai
commit
8cdd01b00e

+ 1 - 1
install/requirements.txt Ver arquivo

@@ -47,7 +47,7 @@ speaklater==1.3
47 47
 sprox==0.9.4
48 48
 stevedore==1.1.0
49 49
 tg.devtools==2.3.7
50
-tgapp-resetpassword==0.1.8
50
+git+https://github.com/algoo/tgapp-resetpassword.git
51 51
 tgext.admin==0.6.4
52 52
 tgext.asyncjob==0.3.1
53 53
 tgext.crud==0.7.3

+ 6 - 0
tracim/test.ini Ver arquivo

@@ -40,6 +40,12 @@ ldap_tls = False
40 40
 ldap_group_enabled = False
41 41
 use = config:development.ini
42 42
 
43
+[app:nosmtp]
44
+resetpassword.smtp_host = localhost
45
+resetpassword.smtp_login = fake
46
+resetpassword.smtp_passwd =  fake
47
+use = config:development.ini
48
+
43 49
 [app:radicale]
44 50
 sqlalchemy.url = sqlite:///tracim_test.sqlite
45 51
 

+ 18 - 0
tracim/tracim/tests/library/test_resetpassword.py Ver arquivo

@@ -1 +1,19 @@
1 1
 # -*- coding: utf-8 -*-
2
+from nose.tools import assert_raises
3
+from resetpassword.lib import _plain_send_mail
4
+
5
+from tracim.tests import TestStandard
6
+
7
+
8
+class TestSerializers(TestStandard):
9
+    application_under_test = 'nosmtp'
10
+
11
+    def test_unit__plain_send_mail__ok(self):
12
+        assert_raises(
13
+            ConnectionRefusedError,
14
+            _plain_send_mail,
15
+            'Name of sender <email@sender.local>',
16
+            'Recipient name <recipient@recipient.local>',
17
+            'hello',
18
+            'How are you ?',
19
+        )