Mark unit tests
authorKarl O. Pinc <kop@karlpinc.com>
Tue, 1 Dec 2020 02:47:20 +0000 (20:47 -0600)
committerKarl O. Pinc <kop@karlpinc.com>
Tue, 1 Dec 2020 02:47:20 +0000 (20:47 -0600)
tests/test_check_settings.py
tests/test_pgwui_upload.py

index d6aac1d5e3d3d357634b943edf268107f06afa9e..3833fd0ff06641ef0711a79632624164efaca06d 100644 (file)
@@ -19,6 +19,8 @@
 
 # Karl O. Pinc <kop@karlpinc.com>
 
+import pytest
+
 import pgwui_upload.check_settings as check_settings
 
 from pgwui_common import checkset
@@ -53,6 +55,7 @@ mock_boolean_settings = testing.make_mock_fixture(
 
 # validate_literal_column_headings()
 
+@pytest.mark.unittest
 def test_validate_literal_column_headings_nosetting():
     '''No error is delivered when there's no setting'''
     errors = []
@@ -61,6 +64,7 @@ def test_validate_literal_column_headings_nosetting():
     assert errors == []
 
 
+@pytest.mark.unittest
 def test_validate_literal_column_headings_on():
     '''No error is delivered when the setting is "on"'''
     errors = []
@@ -70,6 +74,7 @@ def test_validate_literal_column_headings_on():
     assert errors == []
 
 
+@pytest.mark.unittest
 def test_validate_literal_column_headings_off():
     '''No error is delivered when the setting is "off"'''
     errors = []
@@ -79,6 +84,7 @@ def test_validate_literal_column_headings_off():
     assert errors == []
 
 
+@pytest.mark.unittest
 def test_validate_literal_column_headings_ask():
     '''No error is delivered when the setting is "ask"'''
     errors = []
@@ -88,6 +94,7 @@ def test_validate_literal_column_headings_ask():
     assert errors == []
 
 
+@pytest.mark.unittest
 def test_validate_literal_column_headings_bad():
     '''delivers an error when given a bad value'''
     errors = []
@@ -107,6 +114,7 @@ mock_validate_literal_column_headings = testing.make_mock_fixture(
 
 # check_settings()
 
+@pytest.mark.unittest
 def test_check_settings(mock_unknown_settings,
                         mock_require_settings,
                         mock_boolean_settings,
index 131a5d3d3b10580e240885ca964ae680670a5da1..5309dbe2f3b4b224a4c2e815e2f5b72f0252594e 100644 (file)
@@ -19,6 +19,7 @@
 
 # Karl O. Pinc <kop@karlpinc.com>
 
+import pytest
 import pyramid.testing
 
 import pgwui_upload.pgwui_upload as pgwui_upload
@@ -39,6 +40,7 @@ def test_pgwui_upload_is_pgwui_component(pgwui_component_entry_point):
 
 # init_menu()
 
+@pytest.mark.unittest
 def test_init_menu_default():
     '''The settings get the module's default value when no settings exist
     '''
@@ -51,6 +53,7 @@ def test_init_menu_default():
         == pgwui_upload.DEFAULT_UPLOAD_MENU_LABEL
 
 
+@pytest.mark.unittest
 def test_init_menu_no_default():
     '''The settings keep their value when they exist
     '''
@@ -80,6 +83,7 @@ mock_add_route = testing.instance_method_mock_fixture('add_route')
 mock_scan = testing.instance_method_mock_fixture('scan')
 
 
+@pytest.mark.unittest
 def test_includeme(mock_init_menu, mock_add_route, mock_scan):
     '''init_menu, add_route, and scan are all called
     '''