Include test coverage to makefile. Update translations. master
authorStas Shtin <antisvin@gmail.com>
Wed, 21 Apr 2010 16:21:16 +0000 (20:21 +0400)
committerStas Shtin <antisvin@gmail.com>
Wed, 21 Apr 2010 16:21:16 +0000 (20:21 +0400)
Makefile
src/ipypbx/locale/ipypbx_fi.po
src/ipypbx/locale/ipypbx_fi.ts
src/ipypbx/locale/ipypbx_ru.po
src/ipypbx/locale/ipypbx_ru.ts
src/ipypbx/tests/__init__.py
src/ipypbx/tests/support.py
src/ipypbx/tests/test_http.py
src/ipypbx/ui.py

index 4abc8ad..20ea747 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ TRANSLATIONS_PATH=src/ipypbx/locale
 PROJECT=$(BASENAME).pro
 UI=ui/layout.ui
 
-all: generate_sql generate_ui translation
+all: generate_sql generate_ui translation coverage
 
 generate_ui:
        pyuic4 $(UI) -o src/$(BASENAME)/ui.py
@@ -34,3 +34,7 @@ transrelease:
 
 generate_sql:
        PYTHONPATH=projects/sample/:src DJANGO_SETTINGS_MODULE=settings django-admin dumpsql
+
+coverage:
+       nosetests ipypbx.tests --with-coverage --cover-package=ipypbx
+
index 19a5540..7ca2c8e 100644 (file)
@@ -16,25 +16,25 @@ msgid "IPyPBX"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 #, fuzzy
 msgid "Name"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:215
+#: src/ipypbx/controllers.py:208
 #, fuzzy
 msgid "Local Port"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:215
+#: src/ipypbx/controllers.py:208
 #, fuzzy
 msgid "Freeswitch Port"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:215
+#: src/ipypbx/controllers.py:208
 #, fuzzy
 msgid "Freeswitch IP Address"
 msgstr ""
@@ -58,49 +58,49 @@ msgid "Connections"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 #, fuzzy
 msgid "External RTP IP"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 #, fuzzy
 msgid "External SIP IP"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 #, fuzzy
 msgid "RTP IP"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 #, fuzzy
 msgid "SIP IP"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 #, fuzzy
 msgid "SIP Port"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 #, fuzzy
 msgid "Accept Blind Registration"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 #, fuzzy
 msgid "Authenticate Calls"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 #, fuzzy
 msgid "Is Active"
 msgstr ""
@@ -112,7 +112,7 @@ msgid "SIP Profiles"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:343
+#: src/ipypbx/controllers.py:342
 #, fuzzy
 msgid "Host Name"
 msgstr ""
@@ -130,37 +130,37 @@ msgid "Domains"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 #, fuzzy
 msgid "Username"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:379
+#: src/ipypbx/controllers.py:378
 #, fuzzy
 msgid "Password"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 #, fuzzy
 msgid "Realm"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 #, fuzzy
 msgid "From Domain"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 #, fuzzy
 msgid "Expire In Seconds"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 #, fuzzy
 msgid "Retry In Seconds"
 msgstr ""
@@ -178,7 +178,7 @@ msgid "Gateways"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:379
+#: src/ipypbx/controllers.py:378
 #, fuzzy
 msgid "User ID"
 msgstr ""
@@ -196,13 +196,13 @@ msgid "Endpoints"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 #, fuzzy
 msgid "XML Dialplan"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 #, fuzzy
 msgid "Destination Match"
 msgstr ""
@@ -214,49 +214,49 @@ msgid "Extensions"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 #, fuzzy
 msgid "ID"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:215
+#: src/ipypbx/controllers.py:208
 #, fuzzy
 msgid "Local IP Address"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 #, fuzzy
 msgid "Connection ID"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 #, fuzzy
 msgid "SIP Profile ID"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 #, fuzzy
 msgid "Caller ID In From Field"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 #, fuzzy
 msgid "Domain ID"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 #, fuzzy
 msgid "Endpoint ID"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 #, fuzzy
 msgid "Extension"
 msgstr ""
index 0d04b53..b5c5eeb 100644 (file)
@@ -8,22 +8,22 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="215"/>
+        <location filename="src/ipypbx/controllers.py" line="208"/>
         <source>Local Port</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="215"/>
+        <location filename="src/ipypbx/controllers.py" line="208"/>
         <source>Freeswitch Port</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="215"/>
+        <location filename="src/ipypbx/controllers.py" line="208"/>
         <source>Freeswitch IP Address</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>External RTP IP</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>External SIP IP</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>RTP IP</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>SIP IP</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>SIP Port</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>Accept Blind Registration</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Authenticate Calls</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Is Active</source>
         <translation type="unfinished"></translation>
     </message>
@@ -88,7 +88,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="343"/>
+        <location filename="src/ipypbx/controllers.py" line="342"/>
         <source>Host Name</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Username</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="379"/>
+        <location filename="src/ipypbx/controllers.py" line="378"/>
         <source>Password</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Realm</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>From Domain</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Expire In Seconds</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Retry In Seconds</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="379"/>
+        <location filename="src/ipypbx/controllers.py" line="378"/>
         <source>User ID</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>XML Dialplan</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Destination Match</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>ID</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="215"/>
+        <location filename="src/ipypbx/controllers.py" line="208"/>
         <source>Local IP Address</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Connection ID</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>SIP Profile ID</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Caller ID In From Field</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Domain ID</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Endpoint ID</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Extension</source>
         <translation type="unfinished"></translation>
     </message>
index 835220e..96c3919 100644 (file)
@@ -15,17 +15,17 @@ msgid "IPyPBX"
 msgstr "IPyPBX"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 msgid "Name"
 msgstr "Имя"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:215
+#: src/ipypbx/controllers.py:208
 msgid "Local Port"
 msgstr "Локальный порт"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:215
+#: src/ipypbx/controllers.py:208
 msgid "Freeswitch Port"
 msgstr "Порт Freeswitch"
 
@@ -35,7 +35,7 @@ msgstr "Порт Freeswitch"
 #~ msgstr "Локальный IP-адрес"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:215
+#: src/ipypbx/controllers.py:208
 msgid "Freeswitch IP Address"
 msgstr "IP-адрес Freeswitch"
 
@@ -55,42 +55,42 @@ msgid "Connections"
 msgstr "Подключения"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 msgid "External RTP IP"
 msgstr "Внешний RTP IP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 msgid "External SIP IP"
 msgstr "Внешний SIP IP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 msgid "RTP IP"
 msgstr "RTP IP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 msgid "SIP IP"
 msgstr "SIP IP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 msgid "SIP Port"
 msgstr "Порт SIP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:324
+#: src/ipypbx/controllers.py:323
 msgid "Accept Blind Registration"
 msgstr "Безусловная регистрация"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 msgid "Authenticate Calls"
 msgstr "Аутентифицировать звонки"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 msgid "Is Active"
 msgstr "Активен"
 
@@ -100,7 +100,7 @@ msgid "SIP Profiles"
 msgstr "Профили SIP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:343
+#: src/ipypbx/controllers.py:342
 msgid "Host Name"
 msgstr "Имя хоста"
 
@@ -115,32 +115,32 @@ msgid "Domains"
 msgstr "Домены"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 msgid "Username"
 msgstr "Имя пользователя"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:379
+#: src/ipypbx/controllers.py:378
 msgid "Password"
 msgstr "Пароль"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 msgid "Realm"
 msgstr "Realm"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 msgid "From Domain"
 msgstr "Домен в поле \"From\""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 msgid "Expire In Seconds"
 msgstr "Время регистрации в секундах"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 msgid "Retry In Seconds"
 msgstr "Время повтора в секундах"
 
@@ -155,7 +155,7 @@ msgid "Gateways"
 msgstr "Сетевой шлюз"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:379
+#: src/ipypbx/controllers.py:378
 msgid "User ID"
 msgstr "Идентификатор пользователя"
 
@@ -170,12 +170,12 @@ msgid "Endpoints"
 msgstr "Конечное оборудование"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 msgid "XML Dialplan"
 msgstr "План нумерации XML"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 msgid "Destination Match"
 msgstr "Совпадение направления"
 
@@ -190,42 +190,42 @@ msgid "Extensions"
 msgstr "Номера"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 msgid "ID"
 msgstr "Идентификатор"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:215
+#: src/ipypbx/controllers.py:208
 msgid "Local IP Address"
 msgstr "Локальный IP-адрес"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 msgid "Connection ID"
 msgstr "Идентификатор соединения"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 msgid "SIP Profile ID"
 msgstr "Идентификатор SIP-профиля"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 msgid "Caller ID In From Field"
 msgstr "Идентификатор вызывающего абонента в поле \"От\""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 msgid "Domain ID"
 msgstr "Идентификатор домена"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:394
+#: src/ipypbx/controllers.py:393
 msgid "Endpoint ID"
 msgstr "Идентификатор конечного оборудования"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:357
+#: src/ipypbx/controllers.py:356
 #, fuzzy
 msgid "Extension"
 msgstr ""
index 53d9bf2..9d9bd4a 100644 (file)
@@ -8,17 +8,17 @@
         <translation>IPyPBX</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Name</source>
         <translation>Имя</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="215"/>
+        <location filename="src/ipypbx/controllers.py" line="208"/>
         <source>Local Port</source>
         <translation>Локальный порт</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="215"/>
+        <location filename="src/ipypbx/controllers.py" line="208"/>
         <source>Freeswitch Port</source>
         <translation>Порт Freeswitch</translation>
     </message>
@@ -28,7 +28,7 @@
         <translation type="obsolete">Локальный IP-адрес</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="215"/>
+        <location filename="src/ipypbx/controllers.py" line="208"/>
         <source>Freeswitch IP Address</source>
         <translation>IP-адрес Freeswitch</translation>
     </message>
         <translation>Подключения</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>External RTP IP</source>
         <translation>Внешний RTP IP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>External SIP IP</source>
         <translation>Внешний SIP IP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>RTP IP</source>
         <translation>RTP IP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>SIP IP</source>
         <translation>SIP IP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>SIP Port</source>
         <translation>Порт SIP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="324"/>
+        <location filename="src/ipypbx/controllers.py" line="323"/>
         <source>Accept Blind Registration</source>
         <translation>Безусловная регистрация</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Authenticate Calls</source>
         <translation>Аутентифицировать звонки</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Is Active</source>
         <translation>Активен</translation>
     </message>
@@ -93,7 +93,7 @@
         <translation>Профили SIP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="343"/>
+        <location filename="src/ipypbx/controllers.py" line="342"/>
         <source>Host Name</source>
         <translation>Имя хоста</translation>
     </message>
         <translation>Домены</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Username</source>
         <translation>Имя пользователя</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="379"/>
+        <location filename="src/ipypbx/controllers.py" line="378"/>
         <source>Password</source>
         <translation>Пароль</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Realm</source>
         <translation>Realm</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>From Domain</source>
         <translation>Домен в поле &quot;From&quot;</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Expire In Seconds</source>
         <translation>Время регистрации в секундах</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Retry In Seconds</source>
         <translation>Время повтора в секундах</translation>
     </message>
         <translation>Сетевой шлюз</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="379"/>
+        <location filename="src/ipypbx/controllers.py" line="378"/>
         <source>User ID</source>
         <translation>Идентификатор пользователя</translation>
     </message>
         <translation>Конечное оборудование</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>XML Dialplan</source>
         <translation>План нумерации XML</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Destination Match</source>
         <translation>Совпадение направления</translation>
     </message>
         <translation>Номера</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>ID</source>
         <translation>Идентификатор</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="215"/>
+        <location filename="src/ipypbx/controllers.py" line="208"/>
         <source>Local IP Address</source>
         <translation>Локальный IP-адрес</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Connection ID</source>
         <translation>Идентификатор соединения</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>SIP Profile ID</source>
         <translation>Идентификатор SIP-профиля</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Caller ID In From Field</source>
         <translation>Идентификатор вызывающего абонента в поле &quot;От&quot;</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Domain ID</source>
         <translation>Идентификатор домена</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="394"/>
+        <location filename="src/ipypbx/controllers.py" line="393"/>
         <source>Endpoint ID</source>
         <translation>Идентификатор конечного оборудования</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="357"/>
+        <location filename="src/ipypbx/controllers.py" line="356"/>
         <source>Extension</source>
         <translation type="unfinished"></translation>
     </message>
index ac26041..7920144 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with IPyPBX.  If not, see <http://www.gnu.org/licenses/>.
 
+from ipypbx import main
+
+_tables = (
+    'connection', 'sipprofile', 'domain', 'gateway', 'endpoint',
+    'extension')
+
+db = None
+
+from ipypbx.tests.test_http import *
+
+    
+def setUp():
+    global db
+    db, _created = main.setupDb(dbname=':memory:')
 
index 8cde219..bfc8405 100644 (file)
 # along with IPyPBX.  If not, see <http://www.gnu.org/licenses/>.
 
 from ipypbx import main
+from ipypbx.tests import db
 
 class InitDatabase(object):
-    _tables = (
-        'connection', 'sipprofile', 'domain', 'gateway', 'endpoint',
-        'extension')
-    
-    @classmethod
-    def setUpClass(cls):
-        cls.db, _created = main.setupDb(dbname=':memory:')
-
     def setUp(self):
         for table in self._tables:
-            self.db.exec_('delete from ipypbxweb_%s' % table)
+            db.exec_('delete from ipypbxweb_%s' % table)
             
index 7434635..45f3d87 100644 (file)
@@ -20,6 +20,10 @@ from ipypbx import http
 from ipypbx.tests import support
 from xml.etree import ElementTree as etree
 
+__all__ = (
+    'TestHttpRequestParser', 'TestFreeswitchConfigGenerator',
+    'TestSofiaConfGenerator')
+
 
 class TestHttpRequestParser(unittest.TestCase):
     """
@@ -156,6 +160,10 @@ class TestFreeswitchConfigGenerator(unittest.TestCase):
             self.generator.canHandle({'foo': 'bar', 'qwe': 'asd'}), False)
                          
     def test_base_elements(self):
+        """
+        ipypbx.http.FreeswitchConfigGenerator.baseElements returns a tuple of
+        document and section elelements.
+        """
         self.generator.param_match = {'section': 'foo'}
         root_elt, section_elt = self.generator.baseElements
         self.assertEqual(
@@ -166,6 +174,10 @@ class TestFreeswitchConfigGenerator(unittest.TestCase):
             etree.tostring(section_elt), '<section name="foo" />')
 
     def test_add_params(self):
+        """
+        ipypbx.http.FreeswitchConfigGenerator.addParams is a helper method for
+        creating params element.
+        """
         foo_elt = etree.Element('foo')
         self.assertEqual(
             etree.tostring(self.generator.addParams(foo_elt, (('qwe', 'asd'),))),
@@ -179,3 +191,8 @@ class TestFreeswitchConfigGenerator(unittest.TestCase):
                                          (('qwe', 'asd'), ('zxc', '123')))),
             '<bar><params><param name="qwe" value="asd" />'
             '<param name="zxc" value="123" /></params></bar>')
+
+
+class TestSofiaConfGenerator(unittest.TestCase):
+    def test_generate_config(self):
+        pass
index d31b150..44efad4 100644 (file)
@@ -2,7 +2,7 @@
 
 # Form implementation generated from reading ui file 'ui/layout.ui'
 #
-# Created: Thu Apr 15 21:54:09 2010
+# Created: Wed Apr 21 19:42:15 2010
 #      by: PyQt4 UI code generator 4.7.2
 #
 # WARNING! All changes made in this file will be lost!