久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <legend id='Hu9bP'><style id='Hu9bP'><dir id='Hu9bP'><q id='Hu9bP'></q></dir></style></legend>
    1. <tfoot id='Hu9bP'></tfoot>
      <i id='Hu9bP'><tr id='Hu9bP'><dt id='Hu9bP'><q id='Hu9bP'><span id='Hu9bP'><b id='Hu9bP'><form id='Hu9bP'><ins id='Hu9bP'></ins><ul id='Hu9bP'></ul><sub id='Hu9bP'></sub></form><legend id='Hu9bP'></legend><bdo id='Hu9bP'><pre id='Hu9bP'><center id='Hu9bP'></center></pre></bdo></b><th id='Hu9bP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Hu9bP'><tfoot id='Hu9bP'></tfoot><dl id='Hu9bP'><fieldset id='Hu9bP'></fieldset></dl></div>

        <bdo id='Hu9bP'></bdo><ul id='Hu9bP'></ul>

      <small id='Hu9bP'></small><noframes id='Hu9bP'>

      1. 帶有基于文件的電子郵件后端服務器的 Django 測試

        Django Test framework with file based Email backend server(帶有基于文件的電子郵件后端服務器的 Django 測試框架)
        • <i id='56clW'><tr id='56clW'><dt id='56clW'><q id='56clW'><span id='56clW'><b id='56clW'><form id='56clW'><ins id='56clW'></ins><ul id='56clW'></ul><sub id='56clW'></sub></form><legend id='56clW'></legend><bdo id='56clW'><pre id='56clW'><center id='56clW'></center></pre></bdo></b><th id='56clW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='56clW'><tfoot id='56clW'></tfoot><dl id='56clW'><fieldset id='56clW'></fieldset></dl></div>

            <small id='56clW'></small><noframes id='56clW'>

          • <tfoot id='56clW'></tfoot>
              <tbody id='56clW'></tbody>

              <bdo id='56clW'></bdo><ul id='56clW'></ul>
            • <legend id='56clW'><style id='56clW'><dir id='56clW'><q id='56clW'></q></dir></style></legend>

                  本文介紹了帶有基于文件的電子郵件后端服務器的 Django 測試框架的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我已經在 Django 框架中制定了測試用例.

                  I have formulated test cases in Django framework.

                  用例:我正在使用 API 通過向他們發送電子郵件來注冊用戶,當他們點擊電子郵件中提供的鏈接時,他們的帳戶就會被激活.

                  Use Case: I am using API that register user by sending them an Email and when they click on the link provided in the Email their account get activated.

                  在我的 settings.py 中我正在使用

                  In my settings.py I am using

                  EMAIL_FILE_PATH  ='django.core.mail.backends.filebased.EmailBackend'
                  

                  指向本地目錄.

                  從 Eclipse 運行 PyUnit 測試用例時,一切工作文件.為發送的每封電子郵件生成文本文件

                  When running PyUnit test case from eclipse everything works file. Text file gets generated for each email sent

                  但是,當我使用時

                  python ./manage.py test <component_name>
                  

                  文件不會生成.

                  任何見解當我使用 ./manage.py 執行測試用例和使用 pyUnit 時有什么區別?

                  Any insight what is the difference when I execute test case with ./manage.py and when I use pyUnit ?

                  推薦答案

                  簡單的答案:

                  如果不設計自己的電子郵件系統,就無法做到這一點,但這可能很愚蠢.我建議做其他事情來驗證代碼是否成功,而無需發送電子郵件.比如,運行代碼,假設用戶單擊鏈接并創建 RequestFactory 來獲取/發布鏈接以運行與其關聯的視圖代碼.

                  You can't do this without engineering your own email system, but that would probably be silly. I would suggest doing something else to verify that the code was successful without requiring the email to be sent. Like, run the code, assume the user clicks the link and create RequestFactory to get/post the link to run the view code associated with it.

                  來自 Django 測試應用程序:

                  電子郵件服務

                  "If any of your Django views send email using Django's email functionality,
                  you probably don't want to send email each time you run a test using that
                  view. For this reason, Django's test runner automatically redirects all
                  Django-sent email to a dummy outbox. This lets you test every aspect of
                  sending email -- from the number of messages sent to the contents of each
                  message -- without actually sending the messages."
                  

                  這篇關于帶有基于文件的電子郵件后端服務器的 Django 測試框架的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復導入頂級名稱的情況下構造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發帶有已編譯動態共享庫的 Python 包)

                    • <bdo id='we6dE'></bdo><ul id='we6dE'></ul>
                    • <small id='we6dE'></small><noframes id='we6dE'>

                    • <tfoot id='we6dE'></tfoot>
                        <tbody id='we6dE'></tbody>

                      <legend id='we6dE'><style id='we6dE'><dir id='we6dE'><q id='we6dE'></q></dir></style></legend>
                          <i id='we6dE'><tr id='we6dE'><dt id='we6dE'><q id='we6dE'><span id='we6dE'><b id='we6dE'><form id='we6dE'><ins id='we6dE'></ins><ul id='we6dE'></ul><sub id='we6dE'></sub></form><legend id='we6dE'></legend><bdo id='we6dE'><pre id='we6dE'><center id='we6dE'></center></pre></bdo></b><th id='we6dE'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='we6dE'><tfoot id='we6dE'></tfoot><dl id='we6dE'><fieldset id='we6dE'></fieldset></dl></div>

                            主站蜘蛛池模板: 夜夜爽99久久国产综合精品女不卡 | 午夜免费网站 | 欧美区在线 | 在线色网| 在线看片国产精品 | 欧美日产国产成人免费图片 | 日韩在线日韩 | 精品国产乱码 | 中文字幕动漫成人 | 国产精品不卡一区 | 四虎影院在线观看av | 欧美日韩1区| 久久久久久久久精 | 欧美三级在线 | 天天综合天天 | 欧美videosex性极品hd | 久久91精品 | 欧美精品一区二区三区在线 | 久久久久久久久精 | 中文字幕伊人 | 日韩色图在线观看 | 91精品国产综合久久精品 | 天天射夜夜操 | 999精品网 | 中文字幕av亚洲精品一部二部 | 久久久久亚洲av毛片大全 | 亚洲精品久久久久久久久久久久久 | 亚洲精品久久国产高清情趣图文 | 手机看片在线播放 | 爱综合| 播放一级毛片 | 在线看免费的a | 日韩视频在线观看中文字幕 | 国产在线二区 | 亚洲精品一区在线 | 久久精品国产亚洲 | 91精品国产91久久久久久 | 91久久国产综合久久91精品网站 | 亚洲 欧美 日韩 在线 | 久久中文字幕一区 | 久久成人高清视频 |