Skip to main content

M220P: MongoDB for Python Developers

Learn the essentials of Python application development with MongoDB.

Chapter 0

Ticket: Connection

(mflix_venv) PS D:\projects\mflix-python> pytest -m connection
============================= test session starts =============================
platform win32 -- Python 3.7.2, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: D:\projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collecting 0 items
collecting 1 item
collecting 5 items
collecting 9 items
collecting 12 items
collecting 13 items
collecting 14 items
collecting 16 items
collecting 18 items
collecting 21 items
collecting 22 items
collecting 25 items
collecting 27 items
collecting 32 items
collecting 33 items
collecting 37 items
collecting 41 items
collecting 43 items
collected 43 items
  

tests\test_db_connection.py ....                                         [100%]

============================= 39 tests deselected =============================
=================== 4 passed, 39 deselected in 3.45 seconds ===================
(mflix_venv) PS D:\projects\mflix-python> 

Chapter 1: Driver Setup

Ticket: Projection

(mflix_venv) PS D:\projects\mflix-python> pytest -m projection
============================= test session starts =============================
platform win32 -- Python 3.7.2, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: D:\projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_projection.py ..                                              [100%]

============================= 41 tests deselected =============================
=================== 2 passed, 41 deselected in 2.58 seconds ===================
(mflix_venv) PS D:\projects\mflix-python> 

Ticket: Text and Subfield Search

(mflix_venv) PS D:\projects\mflix-python> pytest -m text_and_subfield_search
============================= test session starts =============================
platform win32 -- Python 3.7.2, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: D:\projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_text_and_subfield_search.py .....                             [100%]

============================= 38 tests deselected =============================
=================== 5 passed, 38 deselected in 5.03 seconds ===================                low). To find out more, vi
(mflix_venv) PS D:\projects\mflix-python> 

Chapter 2: User-Facing Backend

Ticket: Paging

PS F:\Projects\mflix-python> pytest -m paging
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_paging.py ...                                                 [100%]

============================= 40 tests deselected =============================
=================== 3 passed, 40 deselected in 4.03 seconds ===================
PS F:\Projects\mflix-python>

Ticket: Faceted Search

PS F:\Projects\mflix-python> pytest -m facets
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_facets.py ..                                                  [100%]

============================= 41 tests deselected =============================
=================== 2 passed, 41 deselected in 2.70 seconds ===================
PS F:\Projects\mflix-python>

Ticket: User Management

PS F:\Projects\mflix-python> pytest -m user_management
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_user_management.py ....                                       [100%]

============================= 39 tests deselected =============================
=================== 4 passed, 39 deselected in 4.81 seconds ===================
PS F:\Projects\mflix-python>

Ticket: User Preferences

PS F:\Projects\mflix-python> pytest -m user_preferences
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_user_preferences.py ....                                      [100%]

============================= 39 tests deselected =============================
================== 4 passed, 39 deselected in 18.06 seconds ===================
PS F:\Projects\mflix-python>

Ticket: Get Comments

PS F:\Projects\mflix-python> pytest -m get_comments
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_get_comments.py ...                                           [100%]

============================= 40 tests deselected =============================
=================== 3 passed, 40 deselected in 5.20 seconds ===================
PS F:\Projects\mflix-python>

Ticket: Create and Update Comments

PS F:\Projects\mflix-python> pytest -m create_update_comments
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_create_update_comments.py ....                                [100%]

============================= 39 tests deselected =============================
=================== 4 passed, 39 deselected in 3.66 seconds ===================
PS F:\Projects\mflix-python>

Ticket: Delete Comments

PS F:\Projects\mflix-python> pytest -m delete_comments
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_delete_comments.py ...                                        [100%]

============================= 40 tests deselected =============================
=================== 3 passed, 40 deselected in 3.71 seconds ===================
PS F:\Projects\mflix-python>

Chapter 3: Admin Backend

Ticket: User Report

PS F:\Projects\mflix-python> pytest -m user_report
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_user_report.py ..                                             [100%]

============================= 41 tests deselected =============================
=================== 2 passed, 41 deselected in 1.95 seconds ===================
PS F:\Projects\mflix-python>

Ticket: Migration

PS F:\Projects\mflix-python> pytest -m migration
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_migration.py .                                                [100%]

============================= 42 tests deselected =============================
=================== 1 passed, 42 deselected in 1.53 seconds ===================
PS F:\Projects\mflix-python>

Chapter 4: Resilience

Ticket: Connection Pool

PS F:\Projects\mflix-python> pytest -m connection_pooling
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_connection_pooling.py .                                       [100%]

============================= 42 tests deselected =============================
=================== 1 passed, 42 deselected in 1.53 seconds ===================
PS F:\Projects\mflix-python>

Ticket: Timeouts

PS F:\Projects\mflix-python> pytest -m timeouts
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: F:\Projects\mflix-python, inifile: pytest.ini
plugins: flask-0.11.0
collected 43 items

tests\test_timeouts.py .                                                 [100%]

============================= 42 tests deselected =============================
=================== 1 passed, 42 deselected in 1.62 seconds ===================
PS F:\Projects\mflix-python>

Popular posts from this blog

Powershell: Get-History

Get-History - Gets a list of the commands entered during the current session.

MSSQL: Fix error 'Consistency validation for SQL Server registry keys'

While installing Microsof SQL Server 2012, I ran into the following error. "The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys." How to fix Replace the D:\x64\FixSqlRegistryKey_x86.exe file with the original file from the ENU\SQLFULL_ENU.iso file downloading from Microsoft Download Center. This ISO file is 4.2GB. So you can click FixSqlRegistryKey_x86.exe to download this file only. After replacing that file, press Re-run to check. All rules are passed.

Powershell: Check Bad Logon

get-aduser -Filter {BadLogonCount -ne 0} -properties * | select SamAccountName,BadLogonCount,BadPasswordTime,BadPwdCount,@{name='badPasswordTimeDT'; expression={[datetime]::fromFileTime($_.badPasswordTime)}} | sort BadPasswordTime | FT