Commit 1eb4258c8e590436fce646e937fa7997954ef7cc
1 parent
5c055c6c22
Exists in
master
fix DB connection bug
Showing
22 changed files
with
2259 additions
and
350 deletions
Show diff stats
.idea/workspace.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project version="4"> | 2 | <project version="4"> |
| 3 | <component name="ChangeListManager"> | 3 | <component name="ChangeListManager"> |
| 4 | <list default="true" id="33187cb8-da74-4b13-8a55-31c4cae60a20" name="Default" comment=""> | 4 | <list default="true" id="33187cb8-da74-4b13-8a55-31c4cae60a20" name="Default" comment=""> |
| 5 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> | 5 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> |
| 6 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/data_fixture/create_testdata.py" afterPath="$PROJECT_DIR$/data_fixture/create_testdata.py" /> | ||
| 6 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/data_fixture/mysql_db.py" afterPath="$PROJECT_DIR$/data_fixture/mysql_db.py" /> | 7 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/data_fixture/mysql_db.py" afterPath="$PROJECT_DIR$/data_fixture/mysql_db.py" /> |
| 7 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/report/test_report.html" afterPath="$PROJECT_DIR$/report/test_report.html" /> | 8 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/report/test_report.html" afterPath="$PROJECT_DIR$/report/test_report.html" /> |
| 9 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/run_test.py" afterPath="$PROJECT_DIR$/run_test.py" /> | ||
| 10 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test_cases/app_record_statistic.py" afterPath="$PROJECT_DIR$/test_cases/app_record_statistic.py" /> | ||
| 11 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test_cases/parent_space.py" afterPath="$PROJECT_DIR$/test_cases/parent_space.py" /> | ||
| 12 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test_cases/personal_info.py" afterPath="$PROJECT_DIR$/test_cases/personal_info.py" /> | ||
| 13 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test_cases/press.py" afterPath="$PROJECT_DIR$/test_cases/press.py" /> | ||
| 14 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test_cases/register.py" afterPath="$PROJECT_DIR$/test_cases/register.py" /> | ||
| 15 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test_cases/sub_account.py" afterPath="$PROJECT_DIR$/test_cases/sub_account.py" /> | ||
| 16 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test_cases/subject_sync.py" afterPath="$PROJECT_DIR$/test_cases/subject_sync.py" /> | ||
| 8 | </list> | 17 | </list> |
| 9 | <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> | 18 | <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> |
| 10 | <option name="TRACKING_ENABLED" value="true" /> | 19 | <option name="TRACKING_ENABLED" value="true" /> |
| 11 | <option name="SHOW_DIALOG" value="false" /> | 20 | <option name="SHOW_DIALOG" value="false" /> |
| 12 | <option name="HIGHLIGHT_CONFLICTS" value="true" /> | 21 | <option name="HIGHLIGHT_CONFLICTS" value="true" /> |
| 13 | <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> | 22 | <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> |
| 14 | <option name="LAST_RESOLUTION" value="IGNORE" /> | 23 | <option name="LAST_RESOLUTION" value="IGNORE" /> |
| 15 | </component> | 24 | </component> |
| 16 | <component name="CoverageDataManager"> | 25 | <component name="CoverageDataManager"> |
| 17 | <SUITE FILE_PATH="coverage/apiTest$debugggggg.coverage" NAME="debugggggg Coverage Results" MODIFIED="1514886595342" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test_cases" /> | 26 | <SUITE FILE_PATH="coverage/apiTest$debugggggg.coverage" NAME="debugggggg Coverage Results" MODIFIED="1514886595342" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test_cases" /> |
| 18 | <SUITE FILE_PATH="coverage/apiTest$run_test.coverage" NAME="run_test Coverage Results" MODIFIED="1515151494257" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> | 27 | <SUITE FILE_PATH="coverage/apiTest$run_test.coverage" NAME="run_test Coverage Results" MODIFIED="1515999141100" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> |
| 19 | </component> | 28 | </component> |
| 20 | <component name="DatabaseView"> | 29 | <component name="DatabaseView"> |
| 21 | <option name="SHOW_INTERMEDIATE" value="true" /> | 30 | <option name="SHOW_INTERMEDIATE" value="true" /> |
| 22 | <option name="GROUP_SCHEMA" value="true" /> | 31 | <option name="GROUP_SCHEMA" value="true" /> |
| 23 | <option name="GROUP_CONTENTS" value="false" /> | 32 | <option name="GROUP_CONTENTS" value="false" /> |
| 24 | <option name="SORT_POSITIONED" value="false" /> | 33 | <option name="SORT_POSITIONED" value="false" /> |
| 25 | <option name="SHOW_TABLE_DETAILS" value="true" /> | 34 | <option name="SHOW_TABLE_DETAILS" value="true" /> |
| 26 | <option name="SHOW_EMPTY_GROUPS" value="false" /> | 35 | <option name="SHOW_EMPTY_GROUPS" value="false" /> |
| 27 | <option name="AUTO_SCROLL_FROM_SOURCE" value="false" /> | 36 | <option name="AUTO_SCROLL_FROM_SOURCE" value="false" /> |
| 28 | <expand /> | 37 | <expand /> |
| 29 | <select /> | 38 | <select /> |
| 30 | </component> | 39 | </component> |
| 31 | <component name="FileEditorManager"> | 40 | <component name="FileEditorManager"> |
| 32 | <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> | 41 | <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> |
| 33 | <file leaf-file-name="mysql_db.py" pinned="false" current-in-tab="true"> | 42 | <file leaf-file-name="mysql_db.py" pinned="false" current-in-tab="false"> |
| 34 | <entry file="file://$PROJECT_DIR$/data_fixture/mysql_db.py"> | 43 | <entry file="file://$PROJECT_DIR$/data_fixture/mysql_db.py"> |
| 35 | <provider selected="true" editor-type-id="text-editor"> | 44 | <provider selected="true" editor-type-id="text-editor"> |
| 36 | <state relative-caret-position="358"> | 45 | <state relative-caret-position="388"> |
| 37 | <caret line="38" column="48" lean-forward="true" selection-start-line="38" selection-start-column="48" selection-end-line="38" selection-end-column="48" /> | 46 | <caret line="44" column="77" lean-forward="true" selection-start-line="44" selection-start-column="52" selection-end-line="44" selection-end-column="77" /> |
| 38 | <folding> | 47 | <folding> |
| 39 | <element signature="e#47#66#0" expanded="true" /> | 48 | <element signature="e#47#66#0" expanded="true" /> |
| 40 | <marker date="1515742817000" expanded="true" signature="1735:1755" ph="select * fro... " /> | 49 | <marker date="1516000191000" expanded="true" signature="1736:1756" ph="select * fro... " /> |
| 41 | <marker date="1515742817000" expanded="true" signature="1735:1757" ph="select * fro... missing_value" /> | 50 | <marker date="1516000191000" expanded="true" signature="1736:1758" ph="select * fro... missing_value" /> |
| 42 | <marker date="1515742817000" expanded="true" signature="1735:1781" ph="select count... missing_value" /> | 51 | <marker date="1516000191000" expanded="true" signature="1736:1782" ph="select count... missing_value" /> |
| 43 | <marker date="1515742817000" expanded="true" signature="1735:1782" ph="select count... missing_value" /> | 52 | <marker date="1516000191000" expanded="true" signature="1736:1783" ph="select count... missing_value" /> |
| 44 | </folding> | 53 | </folding> |
| 45 | </state> | 54 | </state> |
| 46 | </provider> | 55 | </provider> |
| 47 | </entry> | 56 | </entry> |
| 48 | </file> | 57 | </file> |
| 49 | <file leaf-file-name="config_data.py" pinned="false" current-in-tab="false"> | 58 | <file leaf-file-name="config_data.py" pinned="false" current-in-tab="false"> |
| 50 | <entry file="file://$PROJECT_DIR$/data_fixture/config_data.py"> | 59 | <entry file="file://$PROJECT_DIR$/data_fixture/config_data.py"> |
| 51 | <provider selected="true" editor-type-id="text-editor"> | 60 | <provider selected="true" editor-type-id="text-editor"> |
| 52 | <state relative-caret-position="68"> | 61 | <state relative-caret-position="225"> |
| 53 | <caret line="4" column="22" lean-forward="false" selection-start-line="4" selection-start-column="9" selection-end-line="4" selection-end-column="22" /> | 62 | <caret line="40" column="30" lean-forward="true" selection-start-line="40" selection-start-column="30" selection-end-line="40" selection-end-column="30" /> |
| 54 | <folding /> | 63 | <folding /> |
| 55 | </state> | 64 | </state> |
| 56 | </provider> | 65 | </provider> |
| 57 | </entry> | 66 | </entry> |
| 58 | </file> | 67 | </file> |
| 59 | <file leaf-file-name="register.py" pinned="false" current-in-tab="false"> | 68 | <file leaf-file-name="run_test.py" pinned="false" current-in-tab="true"> |
| 60 | <entry file="file://$PROJECT_DIR$/test_cases/register.py"> | 69 | <entry file="file://$PROJECT_DIR$/run_test.py"> |
| 61 | <provider selected="true" editor-type-id="text-editor"> | ||
| 62 | <state relative-caret-position="459"> | ||
| 63 | <caret line="27" column="55" lean-forward="true" selection-start-line="27" selection-start-column="55" selection-end-line="27" selection-end-column="55" /> | ||
| 64 | <folding> | ||
| 65 | <element signature="e#47#62#0" expanded="true" /> | ||
| 66 | </folding> | ||
| 67 | </state> | ||
| 68 | </provider> | ||
| 69 | </entry> | ||
| 70 | </file> | ||
| 71 | <file leaf-file-name="app_record_statistic.py" pinned="false" current-in-tab="false"> | ||
| 72 | <entry file="file://$PROJECT_DIR$/test_cases/app_record_statistic.py"> | ||
| 73 | <provider selected="true" editor-type-id="text-editor"> | 70 | <provider selected="true" editor-type-id="text-editor"> |
| 74 | <state relative-caret-position="306"> | 71 | <state relative-caret-position="493"> |
| 75 | <caret line="18" column="53" lean-forward="true" selection-start-line="18" selection-start-column="53" selection-end-line="18" selection-end-column="53" /> | 72 | <caret line="29" column="25" lean-forward="true" selection-start-line="29" selection-start-column="25" selection-end-line="29" selection-end-column="25" /> |
| 76 | <folding> | 73 | <folding> |
| 77 | <element signature="e#47#62#0" expanded="true" /> | 74 | <element signature="e#47#62#0" expanded="true" /> |
| 78 | </folding> | 75 | </folding> |
| 79 | </state> | 76 | </state> |
| 80 | </provider> | 77 | </provider> |
| 81 | </entry> | 78 | </entry> |
| 82 | </file> | 79 | </file> |
| 83 | <file leaf-file-name="run_test.py" pinned="false" current-in-tab="false"> | 80 | <file leaf-file-name="create_testdata.py" pinned="false" current-in-tab="false"> |
| 84 | <entry file="file://$PROJECT_DIR$/run_test.py"> | 81 | <entry file="file://$PROJECT_DIR$/data_fixture/create_testdata.py"> |
| 85 | <provider selected="true" editor-type-id="text-editor"> | 82 | <provider selected="true" editor-type-id="text-editor"> |
| 86 | <state relative-caret-position="408"> | 83 | <state relative-caret-position="382"> |
| 87 | <caret line="24" column="37" lean-forward="false" selection-start-line="24" selection-start-column="37" selection-end-line="24" selection-end-column="37" /> | 84 | <caret line="32" column="21" lean-forward="true" selection-start-line="32" selection-start-column="21" selection-end-line="32" selection-end-column="21" /> |
| 88 | <folding> | 85 | <folding> |
| 89 | <element signature="e#47#62#0" expanded="true" /> | 86 | <element signature="e#47#83#0" expanded="true" /> |
| 87 | <marker date="1516001168000" expanded="true" signature="1887:1954" ph="select * fro... ozing_customermachine" /> | ||
| 88 | <marker date="1516001168000" expanded="true" signature="1887:1955" ph="select * fro... ozing_customermachine" /> | ||
| 89 | <marker date="1516001168000" expanded="true" signature="1887:1957" ph="select * fro... ozing_customermachine" /> | ||
| 90 | <marker date="1516001168000" expanded="true" signature="1887:1958" ph="select * fro... ozing_customermachine" /> | ||
| 91 | <marker date="1516001168000" expanded="true" signature="1887:1984" ph="select * fro... ozing_customermachine" /> | ||
| 92 | <marker date="1516001168000" expanded="true" signature="2015:2074" ph="SELECT * FRO... ozing_machine" /> | ||
| 93 | <marker date="1516001168000" expanded="true" signature="2015:2075" ph="SELECT * FRO... ozing_machine" /> | ||
| 94 | <marker date="1516001168000" expanded="true" signature="2015:2078" ph="SELECT * FRO... ozing_machine" /> | ||
| 95 | <marker date="1516001168000" expanded="true" signature="2015:2079" ph="SELECT * FRO... ozing_machine" /> | ||
| 96 | <marker date="1516001168000" expanded="true" signature="2015:2105" ph="SELECT * FRO... ozing_machine" /> | ||
| 97 | <marker date="1516001168000" expanded="true" signature="2218:2680" ph="insert into acornuser.ozing_customermachine... " /> | ||
| 98 | <marker date="1516001168000" expanded="true" signature="3394:3463" ph="SELECT * FRO... ozing_samplemachine" /> | ||
| 99 | <marker date="1516001168000" expanded="true" signature="3515:3579" ph="SELECT * FRO... ozing_machine" /> | ||
| 100 | <marker date="1516001168000" expanded="true" signature="5201:5272" ph="select * fro... ozing_customermachine" /> | ||
| 101 | <marker date="1516001168000" expanded="true" signature="5617:5681" ph="SELECT * FRO... ozing_machine" /> | ||
| 102 | <marker date="1516001168000" expanded="true" signature="5742:5822" ph="SELECT * FRO... ozing_machine" /> | ||
| 103 | <marker date="1516001168000" expanded="true" signature="6688:6759" ph="select * fro... ozing_customermachine" /> | ||
| 104 | <marker date="1516001168000" expanded="true" signature="7044:7107" ph="select * fro... ozing_machine" /> | ||
| 105 | <marker date="1516001168000" expanded="true" signature="8181:8246" ph="update acorn... " /> | ||
| 106 | <marker date="1516001168000" expanded="true" signature="8181:8270" ph="update acorn... " /> | ||
| 107 | <marker date="1516001168000" expanded="true" signature="8394:8475" ph="select * fro... child_user" /> | ||
| 108 | <marker date="1516001168000" expanded="true" signature="8541:8622" ph="select * fro... child_user" /> | ||
| 109 | <marker date="1516001168000" expanded="true" signature="8541:8669" ph="select * fro... child_user" /> | ||
| 110 | <marker date="1516001168000" expanded="true" signature="8541:8671" ph="select * fro... child_user" /> | ||
| 111 | <marker date="1516001168000" expanded="true" signature="9559:9644" ph="select * fro... acorn_user_status" /> | ||
| 112 | <marker date="1516001168000" expanded="true" signature="9786:9886" ph="select * fro... acorn_user_status" /> | ||
| 113 | <marker date="1516001168000" expanded="true" signature="10624:10724" ph="select * fro... acorn_user_status" /> | ||
| 114 | <marker date="1516001168000" expanded="true" signature="11768:11826" ph="select * fro... acorn_user_extra" /> | ||
| 115 | <marker date="1516001168000" expanded="true" signature="11863:11949" ph="select * fro... acorn_user_extra" /> | ||
| 116 | <marker date="1516001168000" expanded="true" signature="12380:12449" ph="select * fro... subAccount_user_extra" /> | ||
| 117 | <marker date="1516001168000" expanded="true" signature="12380:12450" ph="select * fro... subAccount_user_extra" /> | ||
| 118 | <marker date="1516001168000" expanded="true" signature="12380:12454" ph="select * fro... subAccount_user_extra" /> | ||
| 119 | <marker date="1516001168000" expanded="true" signature="12489:12558" ph="select * fro... subAccount_user_extra" /> | ||
| 120 | <marker date="1516001168000" expanded="true" signature="12489:12588" ph="select * fro... subAccount_user_extra" /> | ||
| 121 | <marker date="1516001168000" expanded="true" signature="12489:12604" ph="select * fro... subAccount_user_extra" /> | ||
| 122 | <marker date="1516001168000" expanded="true" signature="13814:13914" ph="select * fro... ozing_student" /> | ||
| 123 | <marker date="1516001168000" expanded="true" signature="14016:14102" ph="update acorn... " /> | ||
| 124 | <marker date="1516001168000" expanded="true" signature="14016:14104" ph="update acorn... " /> | ||
| 125 | <marker date="1516001168000" expanded="true" signature="14192:14300" ph="select * fro... ozing_student" /> | ||
| 126 | <marker date="1516001168000" expanded="true" signature="16432:16472" ph="select max(i... acorn_user" /> | ||
| 127 | <marker date="1516001168000" expanded="true" signature="16432:16474" ph="select max(i... acorn_user" /> | ||
| 128 | <marker date="1516001168000" expanded="true" signature="17187:17262" ph="select passw... parents_space_pass" /> | ||
| 129 | <marker date="1516001168000" expanded="true" signature="18218:18270" ph="update analy... " /> | ||
| 130 | <marker date="1516001168000" expanded="true" signature="18218:18287" ph="update analy... " /> | ||
| 131 | <marker date="1516001168000" expanded="true" signature="18218:18315" ph="update analy... " /> | ||
| 132 | <marker date="1516001168000" expanded="true" signature="18218:18316" ph="update analy... " /> | ||
| 90 | </folding> | 133 | </folding> |
| 91 | </state> | 134 | </state> |
| 92 | </provider> | 135 | </provider> |
| 93 | </entry> | 136 | </entry> |
| 94 | </file> | 137 | </file> |
| 95 | <file leaf-file-name="debugggggg.py" pinned="false" current-in-tab="false"> | ||
| 96 | <entry file="file://$PROJECT_DIR$/test_cases/debugggggg.py"> | ||
| 97 | <provider selected="true" editor-type-id="text-editor"> | ||
| 98 | <state relative-caret-position="34"> | ||
| 99 | <caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" /> | ||
| 100 | <folding /> | ||
| 101 | </state> | ||
| 102 | </provider> | ||
| 103 | </entry> | ||
| 104 | </file> | ||
| 105 | <file leaf-file-name="subject_sync.py" pinned="false" current-in-tab="false"> | 138 | <file leaf-file-name="subject_sync.py" pinned="false" current-in-tab="false"> |
| 106 | <entry file="file://$PROJECT_DIR$/test_cases/subject_sync.py"> | 139 | <entry file="file://$PROJECT_DIR$/test_cases/subject_sync.py"> |
| 107 | <provider selected="true" editor-type-id="text-editor"> | 140 | <provider selected="true" editor-type-id="text-editor"> |
| 108 | <state relative-caret-position="204"> | 141 | <state relative-caret-position="1921"> |
| 109 | <caret line="12" column="0" lean-forward="true" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" /> | 142 | <caret line="118" column="54" lean-forward="true" selection-start-line="118" selection-start-column="54" selection-end-line="118" selection-end-column="54" /> |
| 110 | <folding> | 143 | <folding /> |
| 111 | <element signature="e#47#62#0" expanded="true" /> | ||
| 112 | </folding> | ||
| 113 | </state> | ||
| 114 | </provider> | ||
| 115 | </entry> | ||
| 116 | </file> | ||
| 117 | <file leaf-file-name="create_testdata.py" pinned="false" current-in-tab="false"> | ||
| 118 | <entry file="file://$PROJECT_DIR$/data_fixture/create_testdata.py"> | ||
| 119 | <provider selected="true" editor-type-id="text-editor"> | ||
| 120 | <state relative-caret-position="666"> | ||
| 121 | <caret line="356" column="79" lean-forward="false" selection-start-line="356" selection-start-column="67" selection-end-line="356" selection-end-column="79" /> | ||
| 122 | <folding> | ||
| 123 | <element signature="e#47#83#0" expanded="true" /> | ||
| 124 | <marker date="1515219431000" expanded="true" signature="1421:1488" ph="select * fro... ozing_customermachine" /> | ||
| 125 | <marker date="1515219431000" expanded="true" signature="1421:1489" ph="select * fro... ozing_customermachine" /> | ||
| 126 | <marker date="1515219431000" expanded="true" signature="1421:1491" ph="select * fro... ozing_customermachine" /> | ||
| 127 | <marker date="1515219431000" expanded="true" signature="1421:1492" ph="select * fro... ozing_customermachine" /> | ||
| 128 | <marker date="1515219431000" expanded="true" signature="1421:1518" ph="select * fro... ozing_customermachine" /> | ||
| 129 | <marker date="1515219431000" expanded="true" signature="1549:1608" ph="SELECT * FRO... ozing_machine" /> | ||
| 130 | <marker date="1515219431000" expanded="true" signature="1549:1609" ph="SELECT * FRO... ozing_machine" /> | ||
| 131 | <marker date="1515219431000" expanded="true" signature="1549:1612" ph="SELECT * FRO... ozing_machine" /> | ||
| 132 | <marker date="1515219431000" expanded="true" signature="1549:1613" ph="SELECT * FRO... ozing_machine" /> | ||
| 133 | <marker date="1515219431000" expanded="true" signature="1549:1639" ph="SELECT * FRO... ozing_machine" /> | ||
| 134 | <marker date="1515219431000" expanded="true" signature="1752:2214" ph="insert into acornuser.ozing_customermachine... " /> | ||
| 135 | <marker date="1515219431000" expanded="true" signature="2928:2997" ph="SELECT * FRO... ozing_samplemachine" /> | ||
| 136 | <marker date="1515219431000" expanded="true" signature="3049:3113" ph="SELECT * FRO... ozing_machine" /> | ||
| 137 | <marker date="1515219431000" expanded="true" signature="4735:4806" ph="select * fro... ozing_customermachine" /> | ||
| 138 | <marker date="1515219431000" expanded="true" signature="5151:5215" ph="SELECT * FRO... ozing_machine" /> | ||
| 139 | <marker date="1515219431000" expanded="true" signature="5276:5356" ph="SELECT * FRO... ozing_machine" /> | ||
| 140 | <marker date="1515219431000" expanded="true" signature="6222:6293" ph="select * fro... ozing_customermachine" /> | ||
| 141 | <marker date="1515219431000" expanded="true" signature="6578:6641" ph="select * fro... ozing_machine" /> | ||
| 142 | <marker date="1515219431000" expanded="true" signature="7715:7780" ph="update acorn... " /> | ||
| 143 | <marker date="1515219431000" expanded="true" signature="7715:7804" ph="update acorn... " /> | ||
| 144 | <marker date="1515219431000" expanded="true" signature="7928:8009" ph="select * fro... child_user" /> | ||
| 145 | <marker date="1515219431000" expanded="true" signature="8075:8156" ph="select * fro... child_user" /> | ||
| 146 | <marker date="1515219431000" expanded="true" signature="8075:8203" ph="select * fro... child_user" /> | ||
| 147 | <marker date="1515219431000" expanded="true" signature="8075:8205" ph="select * fro... child_user" /> | ||
| 148 | <marker date="1515219431000" expanded="true" signature="9093:9178" ph="select * fro... acorn_user_status" /> | ||
| 149 | <marker date="1515219431000" expanded="true" signature="9320:9420" ph="select * fro... acorn_user_status" /> | ||
| 150 | <marker date="1515219431000" expanded="true" signature="10158:10258" ph="select * fro... acorn_user_status" /> | ||
| 151 | <marker date="1515219431000" expanded="true" signature="11302:11360" ph="select * fro... acorn_user_extra" /> | ||
| 152 | <marker date="1515219431000" expanded="true" signature="11397:11483" ph="select * fro... acorn_user_extra" /> | ||
| 153 | <marker date="1515219431000" expanded="true" signature="11914:11983" ph="select * fro... subAccount_user_extra" /> | ||
| 154 | <marker date="1515219431000" expanded="true" signature="11914:11984" ph="select * fro... subAccount_user_extra" /> | ||
| 155 | <marker date="1515219431000" expanded="true" signature="11914:11988" ph="select * fro... subAccount_user_extra" /> | ||
| 156 | <marker date="1515219431000" expanded="true" signature="12023:12092" ph="select * fro... subAccount_user_extra" /> | ||
| 157 | <marker date="1515219431000" expanded="true" signature="12023:12122" ph="select * fro... subAccount_user_extra" /> | ||
| 158 | <marker date="1515219431000" expanded="true" signature="12023:12138" ph="select * fro... subAccount_user_extra" /> | ||
| 159 | <marker date="1515219431000" expanded="true" signature="13348:13448" ph="select * fro... ozing_student" /> | ||
| 160 | <marker date="1515219431000" expanded="true" signature="13550:13636" ph="update acorn... " /> | ||
| 161 | <marker date="1515219431000" expanded="true" signature="13550:13638" ph="update acorn... " /> | ||
| 162 | <marker date="1515219431000" expanded="true" signature="13726:13834" ph="select * fro... ozing_student" /> | ||
| 163 | <marker date="1515219431000" expanded="true" signature="15966:16006" ph="select max(i... acorn_user" /> | ||
| 164 | <marker date="1515219431000" expanded="true" signature="15966:16008" ph="select max(i... acorn_user" /> | ||
| 165 | <marker date="1515219431000" expanded="true" signature="16721:16796" ph="select passw... parents_space_pass" /> | ||
| 166 | <marker date="1515219431000" expanded="true" signature="17752:17804" ph="update analy... " /> | ||
| 167 | <marker date="1515219431000" expanded="true" signature="17752:17821" ph="update analy... " /> | ||
| 168 | <marker date="1515219431000" expanded="true" signature="17752:17849" ph="update analy... " /> | ||
| 169 | <marker date="1515219431000" expanded="true" signature="17752:17850" ph="update analy... " /> | ||
| 170 | </folding> | ||
| 171 | </state> | 144 | </state> |
| 172 | </provider> | 145 | </provider> |
| 173 | </entry> | 146 | </entry> |
| 174 | </file> | 147 | </file> |
| 175 | </leaf> | 148 | </leaf> |
| 176 | </component> | 149 | </component> |
| 177 | <component name="FileTemplateManagerImpl"> | 150 | <component name="FileTemplateManagerImpl"> |
| 178 | <option name="RECENT_TEMPLATES"> | 151 | <option name="RECENT_TEMPLATES"> |
| 179 | <list> | 152 | <list> |
| 180 | <option value="Python Script" /> | 153 | <option value="Python Script" /> |
| 181 | </list> | 154 | </list> |
| 182 | </option> | 155 | </option> |
| 183 | </component> | 156 | </component> |
| 184 | <component name="FindInProjectRecents"> | 157 | <component name="FindInProjectRecents"> |
| 185 | <findStrings> | 158 | <findStrings> |
| 186 | <find>_generate_report</find> | ||
| 187 | <find>Data</find> | ||
| 188 | <find>test_unbindCard_success</find> | ||
| 189 | <find>login</find> | 159 | <find>login</find> |
| 190 | <find>DEVICE_NUMBER_EDIT_PHONE</find> | 160 | <find>DEVICE_NUMBER_EDIT_PHONE</find> |
| 191 | <find>pre_SetUpElecCard</find> | 161 | <find>pre_SetUpElecCard</find> |
| 192 | <find>authCode</find> | 162 | <find>authCode</find> |
| 193 | <find>subaccountswitch001</find> | 163 | <find>subaccountswitch001</find> |
| 194 | <find>pre_AddSubAccount</find> | 164 | <find>pre_AddSubAccount</find> |
| 195 | <find>parent_id</find> | 165 | <find>parent_id</find> |
| 196 | <find>USER_ID</find> | 166 | <find>USER_ID</find> |
| 197 | <find>USER_PHONE_EDIT</find> | 167 | <find>USER_PHONE_EDIT</find> |
| 198 | <find>RegisterExtrainfoCheck</find> | 168 | <find>RegisterExtrainfoCheck</find> |
| 199 | <find>png</find> | 169 | <find>png</find> |
| 200 | <find>checkSignatureExists</find> | 170 | <find>checkSignatureExists</find> |
| 201 | <find>SUB_ACC_GET_ID_1</find> | 171 | <find>SUB_ACC_GET_ID_1</find> |
| 202 | <find>SUB_ACC_GET_ID_</find> | 172 | <find>SUB_ACC_GET_ID_</find> |
| 203 | <find>SUB_ACC_DEL_ID_2</find> | 173 | <find>SUB_ACC_DEL_ID_2</find> |
| 204 | <find>SUB_ACC_SWITCH_ID_1</find> | 174 | <find>SUB_ACC_SWITCH_ID_1</find> |
| 205 | <find>SUB_ACC</find> | 175 | <find>SUB_ACC</find> |
| 206 | <find>pre_subAccount</find> | 176 | <find>pre_subAccount</find> |
| 207 | <find>pre_elecCard</find> | 177 | <find>pre_elecCard</find> |
| 208 | <find>保卡</find> | 178 | <find>保卡</find> |
| 209 | <find>'time_spend'</find> | 179 | <find>'time_spend'</find> |
| 210 | <find>select_</find> | 180 | <find>select_</find> |
| 211 | <find>Data.DEVICE_NUMBER_CUS_BIND</find> | 181 | <find>Data.DEVICE_NUMBER_CUS_BIND</find> |
| 212 | <find>SUB_ACC_</find> | 182 | <find>SUB_ACC_</find> |
| 213 | <find>test_getAppRecordOneday_success</find> | 183 | <find>test_getAppRecordOneday_success</find> |
| 214 | <find>print</find> | 184 | <find>print</find> |
| 185 | <find>SetUpElecCard</find> | ||
| 186 | <find>test_ConsolidationExercise_success</find> | ||
| 215 | <find>get_parentSpace_password</find> | 187 | <find>get_parentSpace_password</find> |
| 188 | <find>db_test</find> | ||
| 216 | </findStrings> | 189 | </findStrings> |
| 217 | <replaceStrings> | 190 | <replaceStrings> |
| 218 | <replace>app_pid</replace> | 191 | <replace>app_pid</replace> |
| 219 | <replace>'app_pid'</replace> | 192 | <replace>'app_pid'</replace> |
| 220 | <replace>'time_spent'</replace> | 193 | <replace>'time_spent'</replace> |
| 221 | <replace>user_id</replace> | 194 | <replace>user_id</replace> |
| 222 | <replace>device_number</replace> | 195 | <replace>device_number</replace> |
| 223 | <replace>PARENT_ID</replace> | 196 | <replace>PARENT_ID</replace> |
| 224 | </replaceStrings> | 197 | </replaceStrings> |
| 225 | <dirStrings> | 198 | <dirStrings> |
| 226 | <dir>$PROJECT_DIR$</dir> | 199 | <dir>$PROJECT_DIR$</dir> |
| 227 | </dirStrings> | 200 | </dirStrings> |
| 228 | </component> | 201 | </component> |
| 229 | <component name="Git.Settings"> | 202 | <component name="Git.Settings"> |
| 230 | <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> | 203 | <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> |
| 231 | </component> | 204 | </component> |
| 232 | <component name="IdeDocumentHistory"> | 205 | <component name="IdeDocumentHistory"> |
| 233 | <option name="CHANGED_PATHS"> | 206 | <option name="CHANGED_PATHS"> |
| 234 | <list> | 207 | <list> |
| 235 | <option value="$PROJECT_DIR$/tests/elecCard.py" /> | 208 | <option value="$PROJECT_DIR$/tests/elecCard.py" /> |
| 236 | <option value="$PROJECT_DIR$/db_fixture/mysql_db.py" /> | 209 | <option value="$PROJECT_DIR$/db_fixture/mysql_db.py" /> |
| 237 | <option value="$PROJECT_DIR$/tests/configParse'.py" /> | 210 | <option value="$PROJECT_DIR$/tests/configParse'.py" /> |
| 238 | <option value="$PROJECT_DIR$/tests/configParse.py" /> | 211 | <option value="$PROJECT_DIR$/tests/configParse.py" /> |
| 239 | <option value="$PROJECT_DIR$/tests/personalCenter/elecCardFlow_test.py" /> | 212 | <option value="$PROJECT_DIR$/tests/personalCenter/elecCardFlow_test.py" /> |
| 240 | <option value="$PROJECT_DIR$/tests/personalCenter/elecCard_setUp.py" /> | 213 | <option value="$PROJECT_DIR$/tests/personalCenter/elecCard_setUp.py" /> |
| 241 | <option value="$PROJECT_DIR$/tests/personalCenter/elecCard/elecCard_setUp.py" /> | 214 | <option value="$PROJECT_DIR$/tests/personalCenter/elecCard/elecCard_setUp.py" /> |
| 242 | <option value="$PROJECT_DIR$/tests/personalCenter/elecCard/elecCard_check.py" /> | 215 | <option value="$PROJECT_DIR$/tests/personalCenter/elecCard/elecCard_check.py" /> |
| 243 | <option value="$PROJECT_DIR$/tests/test_suites/test_elecCard.py" /> | 216 | <option value="$PROJECT_DIR$/tests/test_suites/test_elecCard.py" /> |
| 244 | <option value="$PROJECT_DIR$/tests/test_cases/__init__.py" /> | 217 | <option value="$PROJECT_DIR$/tests/test_cases/__init__.py" /> |
| 245 | <option value="$PROJECT_DIR$/test_suites/test_elecCard.py" /> | 218 | <option value="$PROJECT_DIR$/test_suites/test_elecCard.py" /> |
| 246 | <option value="$PROJECT_DIR$/data_fixture/UthCode.py" /> | 219 | <option value="$PROJECT_DIR$/data_fixture/UthCode.py" /> |
| 247 | <option value="/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/HtmlTestRunner/runner.py" /> | 220 | <option value="/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/HtmlTestRunner/runner.py" /> |
| 248 | <option value="$PROJECT_DIR$/config.ini" /> | 221 | <option value="$PROJECT_DIR$/config.ini" /> |
| 249 | <option value="$PROJECT_DIR$/HTMLTestRunner.py" /> | 222 | <option value="$PROJECT_DIR$/HTMLTestRunner.py" /> |
| 250 | <option value="$PROJECT_DIR$/test_cases/elecCard_check.py" /> | 223 | <option value="$PROJECT_DIR$/test_cases/elecCard_check.py" /> |
| 251 | <option value="$PROJECT_DIR$/data_fixture/authCode.py" /> | 224 | <option value="$PROJECT_DIR$/data_fixture/authCode.py" /> |
| 252 | <option value="$PROJECT_DIR$/test_cases/elecCard_setUp.py" /> | 225 | <option value="$PROJECT_DIR$/test_cases/elecCard_setUp.py" /> |
| 253 | <option value="$PROJECT_DIR$/data_fixture/test_verify.py" /> | 226 | <option value="$PROJECT_DIR$/data_fixture/test_verify.py" /> |
| 254 | <option value="$PROJECT_DIR$/test_cases/region_grade_school.py" /> | 227 | <option value="$PROJECT_DIR$/test_cases/region_grade_school.py" /> |
| 255 | <option value="$PROJECT_DIR$/test_cases/eleccard_setUp.py" /> | 228 | <option value="$PROJECT_DIR$/test_cases/eleccard_setUp.py" /> |
| 256 | <option value="$PROJECT_DIR$/test_cases/press.py" /> | ||
| 257 | <option value="$PROJECT_DIR$/test_cases/sub_account.py" /> | ||
| 258 | <option value="$PROJECT_DIR$/test_cases/personal_info.py" /> | ||
| 259 | <option value="$PROJECT_DIR$/data_fixture/config_data.py" /> | 229 | <option value="$PROJECT_DIR$/data_fixture/config_data.py" /> |
| 260 | <option value="$PROJECT_DIR$/test_cases/parent_space.py" /> | ||
| 261 | <option value="$PROJECT_DIR$/test_cases/xueketongbu.py" /> | 230 | <option value="$PROJECT_DIR$/test_cases/xueketongbu.py" /> |
| 262 | <option value="$PROJECT_DIR$/test_cases/app_record_statistic.py" /> | ||
| 263 | <option value="$PROJECT_DIR$/data_fixture/create_testdata.py" /> | ||
| 264 | <option value="$PROJECT_DIR$/test_cases/debugggggg.py" /> | 231 | <option value="$PROJECT_DIR$/test_cases/debugggggg.py" /> |
| 265 | <option value="$PROJECT_DIR$/test_cases/__init__.py" /> | 232 | <option value="$PROJECT_DIR$/test_cases/__init__.py" /> |
| 266 | <option value="$PROJECT_DIR$/data_fixture/__init__.py" /> | 233 | <option value="$PROJECT_DIR$/data_fixture/__init__.py" /> |
| 234 | <option value="$PROJECT_DIR$/data_fixture/mysql_db.py" /> | ||
| 235 | <option value="$PROJECT_DIR$/test_cases/register.py" /> | ||
| 236 | <option value="$PROJECT_DIR$/test_cases/parent_space.py" /> | ||
| 237 | <option value="$PROJECT_DIR$/test_cases/press.py" /> | ||
| 238 | <option value="$PROJECT_DIR$/test_cases/sub_account.py" /> | ||
| 239 | <option value="$PROJECT_DIR$/test_cases/app_record_statistic.py" /> | ||
| 240 | <option value="$PROJECT_DIR$/test_cases/personal_info.py" /> | ||
| 241 | <option value="$PROJECT_DIR$/data_fixture/create_testdata.py" /> | ||
| 267 | <option value="$PROJECT_DIR$/test_cases/subject_sync.py" /> | 242 | <option value="$PROJECT_DIR$/test_cases/subject_sync.py" /> |
| 268 | <option value="$PROJECT_DIR$/run_test.py" /> | 243 | <option value="$PROJECT_DIR$/run_test.py" /> |
| 269 | <option value="$PROJECT_DIR$/test_cases/register.py" /> | ||
| 270 | <option value="$PROJECT_DIR$/data_fixture/mysql_db.py" /> | ||
| 271 | </list> | 244 | </list> |
| 272 | </option> | 245 | </option> |
| 273 | </component> | 246 | </component> |
| 274 | <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" /> | 247 | <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" /> |
| 275 | <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" /> | 248 | <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" /> |
| 276 | <component name="JsGulpfileManager"> | 249 | <component name="JsGulpfileManager"> |
| 277 | <detection-done>true</detection-done> | 250 | <detection-done>true</detection-done> |
| 278 | <sorting>DEFINITION_ORDER</sorting> | 251 | <sorting>DEFINITION_ORDER</sorting> |
| 279 | </component> | 252 | </component> |
| 280 | <component name="ProjectFrameBounds" extendedState="6"> | 253 | <component name="ProjectFrameBounds"> |
| 281 | <option name="x" value="23" /> | 254 | <option name="y" value="23" /> |
| 282 | <option name="y" value="85" /> | ||
| 283 | <option name="width" value="1920" /> | 255 | <option name="width" value="1920" /> |
| 284 | <option name="height" value="977" /> | 256 | <option name="height" value="977" /> |
| 285 | </component> | 257 | </component> |
| 286 | <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> | 258 | <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> |
| 287 | <component name="ProjectView"> | 259 | <component name="ProjectView"> |
| 288 | <navigator currentView="ProjectPane" proportions="" version="1"> | 260 | <navigator currentView="ProjectPane" proportions="" version="1"> |
| 289 | <flattenPackages /> | 261 | <flattenPackages /> |
| 290 | <showMembers /> | 262 | <showMembers /> |
| 291 | <showModules /> | 263 | <showModules /> |
| 292 | <showLibraryContents /> | 264 | <showLibraryContents /> |
| 293 | <hideEmptyPackages /> | 265 | <hideEmptyPackages /> |
| 294 | <abbreviatePackageNames /> | 266 | <abbreviatePackageNames /> |
| 295 | <autoscrollToSource /> | 267 | <autoscrollToSource /> |
| 296 | <autoscrollFromSource /> | 268 | <autoscrollFromSource /> |
| 297 | <sortByType /> | 269 | <sortByType /> |
| 298 | <manualOrder /> | 270 | <manualOrder /> |
| 299 | <foldersAlwaysOnTop value="true" /> | 271 | <foldersAlwaysOnTop value="true" /> |
| 300 | </navigator> | 272 | </navigator> |
| 301 | <panes> | 273 | <panes> |
| 302 | <pane id="Scope" /> | 274 | <pane id="Scratches" /> |
| 303 | <pane id="ProjectPane"> | 275 | <pane id="ProjectPane"> |
| 304 | <subPane> | 276 | <subPane> |
| 305 | <expand> | 277 | <expand> |
| 306 | <path> | 278 | <path> |
| 307 | <item name="apiTest" type="b2602c69:ProjectViewProjectNode" /> | 279 | <item name="apiTest" type="b2602c69:ProjectViewProjectNode" /> |
| 308 | <item name="apiTest" type="462c0819:PsiDirectoryNode" /> | 280 | <item name="apiTest" type="462c0819:PsiDirectoryNode" /> |
| 309 | </path> | 281 | </path> |
| 310 | <path> | 282 | <path> |
| 311 | <item name="apiTest" type="b2602c69:ProjectViewProjectNode" /> | 283 | <item name="apiTest" type="b2602c69:ProjectViewProjectNode" /> |
| 312 | <item name="apiTest" type="462c0819:PsiDirectoryNode" /> | 284 | <item name="apiTest" type="462c0819:PsiDirectoryNode" /> |
| 313 | <item name="data_fixture" type="462c0819:PsiDirectoryNode" /> | 285 | <item name="data_fixture" type="462c0819:PsiDirectoryNode" /> |
| 314 | </path> | 286 | </path> |
| 315 | <path> | 287 | <path> |
| 316 | <item name="apiTest" type="b2602c69:ProjectViewProjectNode" /> | 288 | <item name="apiTest" type="b2602c69:ProjectViewProjectNode" /> |
| 317 | <item name="apiTest" type="462c0819:PsiDirectoryNode" /> | 289 | <item name="apiTest" type="462c0819:PsiDirectoryNode" /> |
| 318 | <item name="report" type="462c0819:PsiDirectoryNode" /> | 290 | <item name="report" type="462c0819:PsiDirectoryNode" /> |
| 319 | </path> | 291 | </path> |
| 320 | <path> | 292 | <path> |
| 321 | <item name="apiTest" type="b2602c69:ProjectViewProjectNode" /> | 293 | <item name="apiTest" type="b2602c69:ProjectViewProjectNode" /> |
| 322 | <item name="apiTest" type="462c0819:PsiDirectoryNode" /> | 294 | <item name="apiTest" type="462c0819:PsiDirectoryNode" /> |
| 323 | <item name="test_cases" type="462c0819:PsiDirectoryNode" /> | 295 | <item name="test_cases" type="462c0819:PsiDirectoryNode" /> |
| 324 | </path> | 296 | </path> |
| 325 | <path> | 297 | <path> |
| 326 | <item name="apiTest" type="b2602c69:ProjectViewProjectNode" /> | 298 | <item name="apiTest" type="b2602c69:ProjectViewProjectNode" /> |
| 327 | <item name="apiTest" type="462c0819:PsiDirectoryNode" /> | 299 | <item name="apiTest" type="462c0819:PsiDirectoryNode" /> |
| 328 | <item name="test_suites" type="462c0819:PsiDirectoryNode" /> | 300 | <item name="test_suites" type="462c0819:PsiDirectoryNode" /> |
| 329 | </path> | 301 | </path> |
| 330 | </expand> | 302 | </expand> |
| 331 | <select /> | 303 | <select /> |
| 332 | </subPane> | 304 | </subPane> |
| 333 | </pane> | 305 | </pane> |
| 334 | <pane id="Scratches" /> | 306 | <pane id="Scope" /> |
| 335 | </panes> | 307 | </panes> |
| 336 | </component> | 308 | </component> |
| 337 | <component name="PropertiesComponent"> | 309 | <component name="PropertiesComponent"> |
| 338 | <property name="WebServerToolWindowFactoryState" value="false" /> | 310 | <property name="WebServerToolWindowFactoryState" value="false" /> |
| 339 | <property name="settings.editor.selected.configurable" value="editor.preferences.folding" /> | 311 | <property name="settings.editor.selected.configurable" value="editor.preferences.folding" /> |
| 340 | </component> | 312 | </component> |
| 341 | <component name="RecentsManager"> | 313 | <component name="RecentsManager"> |
| 342 | <key name="MoveFile.RECENT_KEYS"> | 314 | <key name="MoveFile.RECENT_KEYS"> |
| 343 | <recent name="$PROJECT_DIR$/test_cases" /> | 315 | <recent name="$PROJECT_DIR$/test_cases" /> |
| 344 | <recent name="$PROJECT_DIR$" /> | 316 | <recent name="$PROJECT_DIR$" /> |
| 345 | <recent name="$PROJECT_DIR$/tests" /> | 317 | <recent name="$PROJECT_DIR$/tests" /> |
| 346 | <recent name="$PROJECT_DIR$/tests/test_cases" /> | 318 | <recent name="$PROJECT_DIR$/tests/test_cases" /> |
| 347 | <recent name="$PROJECT_DIR$/tests/test_cases/personalCenter" /> | 319 | <recent name="$PROJECT_DIR$/tests/test_cases/personalCenter" /> |
| 348 | </key> | 320 | </key> |
| 349 | <key name="CopyFile.RECENT_KEYS"> | 321 | <key name="CopyFile.RECENT_KEYS"> |
| 350 | <recent name="$PROJECT_DIR$/test_cases" /> | 322 | <recent name="$PROJECT_DIR$/test_cases" /> |
| 351 | <recent name="$PROJECT_DIR$" /> | 323 | <recent name="$PROJECT_DIR$" /> |
| 352 | </key> | 324 | </key> |
| 353 | </component> | 325 | </component> |
| 354 | <component name="RunDashboard"> | 326 | <component name="RunDashboard"> |
| 355 | <option name="ruleStates"> | 327 | <option name="ruleStates"> |
| 356 | <list> | 328 | <list> |
| 357 | <RuleState> | 329 | <RuleState> |
| 358 | <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> | 330 | <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> |
| 359 | </RuleState> | 331 | </RuleState> |
| 360 | <RuleState> | 332 | <RuleState> |
| 361 | <option name="name" value="StatusDashboardGroupingRule" /> | 333 | <option name="name" value="StatusDashboardGroupingRule" /> |
| 362 | </RuleState> | 334 | </RuleState> |
| 363 | </list> | 335 | </list> |
| 364 | </option> | 336 | </option> |
| 365 | </component> | 337 | </component> |
| 366 | <component name="RunManager" selected="Python.run_test"> | 338 | <component name="RunManager" selected="Python.run_test"> |
| 367 | <configuration name="debugggggg" type="PythonConfigurationType" factoryName="Python" temporary="true"> | 339 | <configuration name="debugggggg" type="PythonConfigurationType" factoryName="Python" temporary="true"> |
| 368 | <option name="INTERPRETER_OPTIONS" value="" /> | 340 | <option name="INTERPRETER_OPTIONS" value="" /> |
| 369 | <option name="PARENT_ENVS" value="true" /> | 341 | <option name="PARENT_ENVS" value="true" /> |
| 370 | <envs> | 342 | <envs> |
| 371 | <env name="PYTHONUNBUFFERED" value="1" /> | 343 | <env name="PYTHONUNBUFFERED" value="1" /> |
| 372 | </envs> | 344 | </envs> |
| 373 | <option name="SDK_HOME" value="" /> | 345 | <option name="SDK_HOME" value="" /> |
| 374 | <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test_cases" /> | 346 | <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test_cases" /> |
| 375 | <option name="IS_MODULE_SDK" value="true" /> | 347 | <option name="IS_MODULE_SDK" value="true" /> |
| 376 | <option name="ADD_CONTENT_ROOTS" value="true" /> | 348 | <option name="ADD_CONTENT_ROOTS" value="true" /> |
| 377 | <option name="ADD_SOURCE_ROOTS" value="true" /> | 349 | <option name="ADD_SOURCE_ROOTS" value="true" /> |
| 378 | <module name="apiTest" /> | 350 | <module name="apiTest" /> |
| 379 | <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" /> | 351 | <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" /> |
| 380 | <option name="SCRIPT_NAME" value="$PROJECT_DIR$/test_cases/debugggggg.py" /> | 352 | <option name="SCRIPT_NAME" value="$PROJECT_DIR$/test_cases/debugggggg.py" /> |
| 381 | <option name="PARAMETERS" value="" /> | 353 | <option name="PARAMETERS" value="" /> |
| 382 | <option name="SHOW_COMMAND_LINE" value="false" /> | 354 | <option name="SHOW_COMMAND_LINE" value="false" /> |
| 383 | <option name="EMULATE_TERMINAL" value="false" /> | 355 | <option name="EMULATE_TERMINAL" value="false" /> |
| 384 | </configuration> | 356 | </configuration> |
| 385 | <configuration name="run_test" type="PythonConfigurationType" factoryName="Python" temporary="true"> | 357 | <configuration name="run_test" type="PythonConfigurationType" factoryName="Python" temporary="true"> |
| 386 | <option name="INTERPRETER_OPTIONS" value="" /> | 358 | <option name="INTERPRETER_OPTIONS" value="" /> |
| 387 | <option name="PARENT_ENVS" value="true" /> | 359 | <option name="PARENT_ENVS" value="true" /> |
| 388 | <envs> | 360 | <envs> |
| 389 | <env name="PYTHONUNBUFFERED" value="1" /> | 361 | <env name="PYTHONUNBUFFERED" value="1" /> |
| 390 | </envs> | 362 | </envs> |
| 391 | <option name="SDK_HOME" value="" /> | 363 | <option name="SDK_HOME" value="" /> |
| 392 | <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> | 364 | <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> |
| 393 | <option name="IS_MODULE_SDK" value="true" /> | 365 | <option name="IS_MODULE_SDK" value="true" /> |
| 394 | <option name="ADD_CONTENT_ROOTS" value="true" /> | 366 | <option name="ADD_CONTENT_ROOTS" value="true" /> |
| 395 | <option name="ADD_SOURCE_ROOTS" value="true" /> | 367 | <option name="ADD_SOURCE_ROOTS" value="true" /> |
| 396 | <module name="apiTest" /> | 368 | <module name="apiTest" /> |
| 397 | <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" /> | 369 | <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" /> |
| 398 | <option name="SCRIPT_NAME" value="$PROJECT_DIR$/run_test.py" /> | 370 | <option name="SCRIPT_NAME" value="$PROJECT_DIR$/run_test.py" /> |
| 399 | <option name="PARAMETERS" value="" /> | 371 | <option name="PARAMETERS" value="" /> |
| 400 | <option name="SHOW_COMMAND_LINE" value="false" /> | 372 | <option name="SHOW_COMMAND_LINE" value="false" /> |
| 401 | <option name="EMULATE_TERMINAL" value="false" /> | 373 | <option name="EMULATE_TERMINAL" value="false" /> |
| 402 | </configuration> | 374 | </configuration> |
| 403 | <list size="2"> | 375 | <list size="2"> |
| 404 | <item index="0" class="java.lang.String" itemvalue="Python.run_test" /> | 376 | <item index="0" class="java.lang.String" itemvalue="Python.run_test" /> |
| 405 | <item index="1" class="java.lang.String" itemvalue="Python.debugggggg" /> | 377 | <item index="1" class="java.lang.String" itemvalue="Python.debugggggg" /> |
| 406 | </list> | 378 | </list> |
| 407 | <recent_temporary> | 379 | <recent_temporary> |
| 408 | <list size="2"> | 380 | <list size="2"> |
| 409 | <item index="0" class="java.lang.String" itemvalue="Python.run_test" /> | 381 | <item index="0" class="java.lang.String" itemvalue="Python.run_test" /> |
| 410 | <item index="1" class="java.lang.String" itemvalue="Python.debugggggg" /> | 382 | <item index="1" class="java.lang.String" itemvalue="Python.debugggggg" /> |
| 411 | </list> | 383 | </list> |
| 412 | </recent_temporary> | 384 | </recent_temporary> |
| 413 | </component> | 385 | </component> |
| 414 | <component name="ShelveChangesManager" show_recycled="false"> | 386 | <component name="ShelveChangesManager" show_recycled="false"> |
| 415 | <option name="remove_strategy" value="false" /> | 387 | <option name="remove_strategy" value="false" /> |
| 416 | </component> | 388 | </component> |
| 417 | <component name="TaskManager"> | 389 | <component name="TaskManager"> |
| 418 | <task active="true" id="Default" summary="Default task"> | 390 | <task active="true" id="Default" summary="Default task"> |
| 419 | <changelist id="33187cb8-da74-4b13-8a55-31c4cae60a20" name="Default" comment="" /> | 391 | <changelist id="33187cb8-da74-4b13-8a55-31c4cae60a20" name="Default" comment="" /> |
| 420 | <created>1512799492607</created> | 392 | <created>1512799492607</created> |
| 421 | <option name="number" value="Default" /> | 393 | <option name="number" value="Default" /> |
| 422 | <option name="presentableId" value="Default" /> | 394 | <option name="presentableId" value="Default" /> |
| 423 | <updated>1512799492607</updated> | 395 | <updated>1512799492607</updated> |
| 424 | </task> | 396 | </task> |
| 425 | <servers /> | 397 | <servers /> |
| 426 | </component> | 398 | </component> |
| 427 | <component name="TodoView"> | 399 | <component name="TodoView"> |
| 428 | <todo-panel id="selected-file"> | 400 | <todo-panel id="selected-file"> |
| 429 | <is-autoscroll-to-source value="true" /> | 401 | <is-autoscroll-to-source value="true" /> |
| 430 | </todo-panel> | 402 | </todo-panel> |
| 431 | <todo-panel id="all"> | 403 | <todo-panel id="all"> |
| 432 | <are-packages-shown value="true" /> | 404 | <are-packages-shown value="true" /> |
| 433 | <is-autoscroll-to-source value="true" /> | 405 | <is-autoscroll-to-source value="true" /> |
| 434 | </todo-panel> | 406 | </todo-panel> |
| 435 | </component> | 407 | </component> |
| 436 | <component name="ToolWindowManager"> | 408 | <component name="ToolWindowManager"> |
| 437 | <frame x="-9" y="23" width="1920" height="977" extended-state="6" /> | 409 | <frame x="0" y="23" width="1920" height="977" extended-state="6" /> |
| 438 | <editor active="true" /> | 410 | <editor active="true" /> |
| 439 | <layout> | 411 | <layout> |
| 440 | <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32993197" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> | 412 | <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32993197" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> |
| 441 | <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> | 413 | <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> |
| 442 | <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> | 414 | <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> |
| 443 | <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24829932" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> | 415 | <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.15419501" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> |
| 444 | <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2857143" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> | 416 | <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2857143" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> |
| 445 | <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32993197" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> | 417 | <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32993197" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> |
| 446 | <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17891374" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> | 418 | <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18051118" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> |
| 447 | <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32960597" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> | 419 | <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32960597" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> |
| 448 | <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> | 420 | <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
| 449 | <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> | 421 | <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
| 450 | <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> | 422 | <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> |
| 451 | <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4580499" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> | 423 | <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24829932" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> |
| 452 | <window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2284345" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> | 424 | <window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2284345" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> |
| 453 | <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> | 425 | <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> |
| 454 | <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> | 426 | <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> |
| 455 | <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> | 427 | <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> |
| 456 | <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> | 428 | <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> |
| 457 | <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> | 429 | <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> |
| 458 | <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> | 430 | <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
| 459 | </layout> | 431 | </layout> |
| 460 | <layout-to-restore> | 432 | <layout-to-restore> |
| 461 | <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32993197" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> | 433 | <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32993197" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> |
| 462 | <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> | 434 | <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> |
| 463 | <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> | 435 | <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> |
| 464 | <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> | 436 | <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> |
| 465 | <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> | 437 | <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> |
| 466 | <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> | 438 | <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> |
| 467 | <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> | 439 | <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> |
| 468 | <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32993197" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> | 440 | <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32993197" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> |
| 469 | <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22108844" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> | 441 | <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22108844" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> |
| 470 | <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32993197" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" /> | 442 | <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32993197" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" /> |
| 471 | <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17571884" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> | 443 | <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17571884" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> |
| 472 | <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> | 444 | <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> |
| 473 | <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> | 445 | <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> |
| 474 | <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> | 446 | <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
| 475 | <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> | 447 | <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
| 476 | <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> | 448 | <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
| 477 | <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> | 449 | <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> |
| 478 | <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.34807256" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> | 450 | <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.34807256" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> |
| 479 | <window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> | 451 | <window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> |
| 480 | </layout-to-restore> | 452 | </layout-to-restore> |
| 481 | </component> | 453 | </component> |
| 482 | <component name="TypeScriptGeneratedFilesManager"> | 454 | <component name="TypeScriptGeneratedFilesManager"> |
| 483 | <option name="version" value="1" /> | 455 | <option name="version" value="1" /> |
| 484 | </component> | 456 | </component> |
| 485 | <component name="VcsContentAnnotationSettings"> | 457 | <component name="VcsContentAnnotationSettings"> |
| 486 | <option name="myLimit" value="2678400000" /> | 458 | <option name="myLimit" value="2678400000" /> |
| 487 | </component> | 459 | </component> |
| 488 | <component name="XDebuggerManager"> | 460 | <component name="XDebuggerManager"> |
| 489 | <breakpoint-manager> | 461 | <breakpoint-manager> |
| 490 | <breakpoints> | 462 | <breakpoints> |
| 491 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> | 463 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> |
| 492 | <url>file://$PROJECT_DIR$/test_cases/sub_account.py</url> | 464 | <url>file://$PROJECT_DIR$/test_cases/sub_account.py</url> |
| 493 | <line>56</line> | 465 | <line>55</line> |
| 494 | <option name="timeStamp" value="82" /> | 466 | <option name="timeStamp" value="82" /> |
| 495 | </line-breakpoint> | 467 | </line-breakpoint> |
| 496 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> | 468 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> |
| 497 | <url>file://$PROJECT_DIR$/test_cases/register.py</url> | 469 | <url>file://$PROJECT_DIR$/test_cases/register.py</url> |
| 498 | <line>18</line> | 470 | <line>18</line> |
| 499 | <option name="timeStamp" value="102" /> | 471 | <option name="timeStamp" value="102" /> |
| 500 | </line-breakpoint> | 472 | </line-breakpoint> |
| 501 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> | 473 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> |
| 502 | <url>file://$PROJECT_DIR$/test_cases/personal_info.py</url> | ||
| 503 | <line>253</line> | ||
| 504 | <option name="timeStamp" value="113" /> | ||
| 505 | </line-breakpoint> | ||
| 506 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> | ||
| 507 | <url>file://$PROJECT_DIR$/test_cases/debugggggg.py</url> | 474 | <url>file://$PROJECT_DIR$/test_cases/debugggggg.py</url> |
| 508 | <line>18</line> | 475 | <line>18</line> |
| 509 | <option name="timeStamp" value="140" /> | 476 | <option name="timeStamp" value="140" /> |
| 510 | </line-breakpoint> | 477 | </line-breakpoint> |
| 511 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> | 478 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> |
| 512 | <url>file://$PROJECT_DIR$/test_cases/app_record_statistic.py</url> | 479 | <url>file://$PROJECT_DIR$/test_cases/app_record_statistic.py</url> |
| 513 | <line>181</line> | 480 | <line>180</line> |
| 514 | <option name="timeStamp" value="188" /> | 481 | <option name="timeStamp" value="188" /> |
| 515 | </line-breakpoint> | 482 | </line-breakpoint> |
| 483 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> | ||
| 484 | <url>file://$PROJECT_DIR$/test_cases/parent_space.py</url> | ||
| 485 | <line>46</line> | ||
| 486 | <option name="timeStamp" value="189" /> | ||
| 487 | </line-breakpoint> | ||
| 488 | <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> | ||
| 489 | <url>file://$PROJECT_DIR$/test_cases/register.py</url> | ||
| 490 | <line>3</line> | ||
| 491 | <option name="timeStamp" value="192" /> | ||
| 492 | </line-breakpoint> | ||
| 516 | </breakpoints> | 493 | </breakpoints> |
| 517 | <breakpoints-dialog> | 494 | <breakpoints-dialog> |
| 518 | <breakpoints-dialog /> | 495 | <breakpoints-dialog /> |
| 519 | </breakpoints-dialog> | 496 | </breakpoints-dialog> |
| 520 | <option name="time" value="189" /> | 497 | <default-breakpoints> |
| 498 | <breakpoint type="python-exception"> | ||
| 499 | <properties notifyOnTerminate="true" exception="BaseException"> | ||
| 500 | <option name="notifyOnTerminate" value="true" /> | ||
| 501 | </properties> | ||
| 502 | </breakpoint> | ||
| 503 | </default-breakpoints> | ||
| 504 | <option name="time" value="193" /> | ||
| 521 | </breakpoint-manager> | 505 | </breakpoint-manager> |
| 522 | <watches-manager /> | 506 | <watches-manager /> |
| 523 | </component> | 507 | </component> |
| 524 | <component name="editorHistoryManager"> | 508 | <component name="editorHistoryManager"> |
| 525 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/suite.py"> | ||
| 526 | <provider selected="true" editor-type-id="text-editor"> | ||
| 527 | <state relative-caret-position="1360"> | ||
| 528 | <caret line="83" column="0" lean-forward="false" selection-start-line="83" selection-start-column="0" selection-end-line="83" selection-end-column="0" /> | ||
| 529 | <folding /> | ||
| 530 | </state> | ||
| 531 | </provider> | ||
| 532 | </entry> | ||
| 533 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/codecs.py"> | ||
| 534 | <provider selected="true" editor-type-id="text-editor"> | ||
| 535 | <state relative-caret-position="5627"> | ||
| 536 | <caret line="331" column="0" lean-forward="false" selection-start-line="331" selection-start-column="0" selection-end-line="331" selection-end-column="0" /> | ||
| 537 | </state> | ||
| 538 | </provider> | ||
| 539 | </entry> | ||
| 540 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/HtmlTestRunner/runner.py" /> | 509 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/HtmlTestRunner/runner.py" /> |
| 541 | <entry file="file://$PROJECT_DIR$/config.ini" /> | 510 | <entry file="file://$PROJECT_DIR$/config.ini" /> |
| 542 | <entry file="file://$PROJECT_DIR$/data_fixture/mysql_db.py"> | 511 | <entry file="file://$PROJECT_DIR$/data_fixture/mysql_db.py"> |
| 543 | <provider selected="true" editor-type-id="text-editor"> | 512 | <provider selected="true" editor-type-id="text-editor"> |
| 544 | <state relative-caret-position="0"> | 513 | <state relative-caret-position="0"> |
| 545 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="18" selection-end-column="0" /> | 514 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="18" selection-end-column="0" /> |
| 546 | <folding> | 515 | <folding> |
| 547 | <element signature="e#47#66#0" expanded="true" /> | 516 | <element signature="e#47#66#0" expanded="true" /> |
| 548 | <marker date="1515742817000" expanded="true" signature="1735:1755" ph="select * fro... " /> | 517 | <marker date="1516000191000" expanded="true" signature="1736:1756" ph="select * fro... " /> |
| 549 | <marker date="1515742817000" expanded="true" signature="1735:1757" ph="select * fro... missing_value" /> | 518 | <marker date="1516000191000" expanded="true" signature="1736:1758" ph="select * fro... missing_value" /> |
| 550 | <marker date="1515742817000" expanded="true" signature="1735:1781" ph="select count... missing_value" /> | 519 | <marker date="1516000191000" expanded="true" signature="1736:1782" ph="select count... missing_value" /> |
| 551 | <marker date="1515742817000" expanded="true" signature="1735:1782" ph="select count... missing_value" /> | 520 | <marker date="1516000191000" expanded="true" signature="1736:1783" ph="select count... missing_value" /> |
| 552 | </folding> | 521 | </folding> |
| 553 | </state> | 522 | </state> |
| 554 | </provider> | 523 | </provider> |
| 555 | </entry> | 524 | </entry> |
| 556 | <entry file="file://$PROJECT_DIR$/configParse.py"> | 525 | <entry file="file://$PROJECT_DIR$/configParse.py"> |
| 557 | <provider selected="true" editor-type-id="text-editor"> | 526 | <provider selected="true" editor-type-id="text-editor"> |
| 558 | <state relative-caret-position="238"> | 527 | <state relative-caret-position="238"> |
| 559 | <caret line="16" column="45" lean-forward="false" selection-start-line="16" selection-start-column="45" selection-end-line="16" selection-end-column="45" /> | 528 | <caret line="16" column="45" lean-forward="false" selection-start-line="16" selection-start-column="45" selection-end-line="16" selection-end-column="45" /> |
| 560 | </state> | 529 | </state> |
| 561 | </provider> | 530 | </provider> |
| 562 | </entry> | 531 | </entry> |
| 563 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_setUp.py"> | 532 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_setUp.py"> |
| 564 | <provider selected="true" editor-type-id="text-editor"> | 533 | <provider selected="true" editor-type-id="text-editor"> |
| 565 | <state relative-caret-position="748"> | 534 | <state relative-caret-position="748"> |
| 566 | <caret line="47" column="0" lean-forward="false" selection-start-line="47" selection-start-column="0" selection-end-line="47" selection-end-column="0" /> | 535 | <caret line="47" column="0" lean-forward="false" selection-start-line="47" selection-start-column="0" selection-end-line="47" selection-end-column="0" /> |
| 567 | <folding /> | 536 | <folding /> |
| 568 | </state> | 537 | </state> |
| 569 | </provider> | 538 | </provider> |
| 570 | </entry> | 539 | </entry> |
| 571 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_check.py"> | 540 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_check.py"> |
| 572 | <provider selected="true" editor-type-id="text-editor"> | 541 | <provider selected="true" editor-type-id="text-editor"> |
| 573 | <state relative-caret-position="816"> | 542 | <state relative-caret-position="816"> |
| 574 | <caret line="51" column="23" lean-forward="false" selection-start-line="51" selection-start-column="23" selection-end-line="51" selection-end-column="23" /> | 543 | <caret line="51" column="23" lean-forward="false" selection-start-line="51" selection-start-column="23" selection-end-line="51" selection-end-column="23" /> |
| 575 | <folding /> | ||
| 576 | </state> | 544 | </state> |
| 577 | </provider> | 545 | </provider> |
| 578 | </entry> | 546 | </entry> |
| 579 | <entry file="file://$PROJECT_DIR$/config.ini" /> | 547 | <entry file="file://$PROJECT_DIR$/config.ini" /> |
| 580 | <entry file="file://$PROJECT_DIR$/data_fixture/mysql_db.py"> | 548 | <entry file="file://$PROJECT_DIR$/data_fixture/mysql_db.py"> |
| 581 | <provider selected="true" editor-type-id="text-editor"> | 549 | <provider selected="true" editor-type-id="text-editor"> |
| 582 | <state relative-caret-position="0"> | 550 | <state relative-caret-position="0"> |
| 583 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="18" selection-end-column="0" /> | 551 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="18" selection-end-column="0" /> |
| 584 | <folding> | 552 | <folding> |
| 585 | <element signature="e#47#66#0" expanded="true" /> | 553 | <element signature="e#47#66#0" expanded="true" /> |
| 586 | <marker date="1515742817000" expanded="true" signature="1735:1755" ph="select * fro... " /> | 554 | <marker date="1516000191000" expanded="true" signature="1736:1756" ph="select * fro... " /> |
| 587 | <marker date="1515742817000" expanded="true" signature="1735:1757" ph="select * fro... missing_value" /> | 555 | <marker date="1516000191000" expanded="true" signature="1736:1758" ph="select * fro... missing_value" /> |
| 588 | <marker date="1515742817000" expanded="true" signature="1735:1781" ph="select count... missing_value" /> | 556 | <marker date="1516000191000" expanded="true" signature="1736:1782" ph="select count... missing_value" /> |
| 589 | <marker date="1515742817000" expanded="true" signature="1735:1782" ph="select count... missing_value" /> | 557 | <marker date="1516000191000" expanded="true" signature="1736:1783" ph="select count... missing_value" /> |
| 590 | </folding> | 558 | </folding> |
| 591 | </state> | 559 | </state> |
| 592 | </provider> | 560 | </provider> |
| 593 | </entry> | 561 | </entry> |
| 594 | <entry file="file://$PROJECT_DIR$/configParse.py"> | 562 | <entry file="file://$PROJECT_DIR$/configParse.py"> |
| 595 | <provider selected="true" editor-type-id="text-editor"> | 563 | <provider selected="true" editor-type-id="text-editor"> |
| 596 | <state relative-caret-position="272"> | 564 | <state relative-caret-position="272"> |
| 597 | <caret line="16" column="45" lean-forward="true" selection-start-line="16" selection-start-column="45" selection-end-line="16" selection-end-column="45" /> | 565 | <caret line="16" column="45" lean-forward="true" selection-start-line="16" selection-start-column="45" selection-end-line="16" selection-end-column="45" /> |
| 598 | </state> | 566 | </state> |
| 599 | </provider> | 567 | </provider> |
| 600 | </entry> | 568 | </entry> |
| 601 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_setUp.py"> | 569 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_setUp.py"> |
| 602 | <provider selected="true" editor-type-id="text-editor"> | 570 | <provider selected="true" editor-type-id="text-editor"> |
| 603 | <state relative-caret-position="799"> | 571 | <state relative-caret-position="799"> |
| 604 | <caret line="47" column="0" lean-forward="true" selection-start-line="47" selection-start-column="0" selection-end-line="47" selection-end-column="0" /> | 572 | <caret line="47" column="0" lean-forward="true" selection-start-line="47" selection-start-column="0" selection-end-line="47" selection-end-column="0" /> |
| 605 | <folding /> | 573 | <folding /> |
| 606 | </state> | 574 | </state> |
| 607 | </provider> | 575 | </provider> |
| 608 | </entry> | 576 | </entry> |
| 609 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_check.py"> | 577 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_check.py"> |
| 610 | <provider selected="true" editor-type-id="text-editor"> | 578 | <provider selected="true" editor-type-id="text-editor"> |
| 611 | <state relative-caret-position="867"> | 579 | <state relative-caret-position="867"> |
| 612 | <caret line="51" column="23" lean-forward="true" selection-start-line="51" selection-start-column="23" selection-end-line="51" selection-end-column="23" /> | 580 | <caret line="51" column="23" lean-forward="true" selection-start-line="51" selection-start-column="23" selection-end-line="51" selection-end-column="23" /> |
| 613 | <folding /> | ||
| 614 | </state> | 581 | </state> |
| 615 | </provider> | 582 | </provider> |
| 616 | </entry> | 583 | </entry> |
| 617 | <entry file="file://$PROJECT_DIR$/configParse.py"> | 584 | <entry file="file://$PROJECT_DIR$/configParse.py"> |
| 618 | <provider selected="true" editor-type-id="text-editor"> | 585 | <provider selected="true" editor-type-id="text-editor"> |
| 619 | <state relative-caret-position="0"> | 586 | <state relative-caret-position="0"> |
| 620 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | 587 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
| 621 | </state> | 588 | </state> |
| 622 | </provider> | 589 | </provider> |
| 623 | </entry> | 590 | </entry> |
| 624 | <entry file="file://$PROJECT_DIR$/tests/test_cases/__init__.py" /> | 591 | <entry file="file://$PROJECT_DIR$/tests/test_cases/__init__.py" /> |
| 625 | <entry file="file://$PROJECT_DIR$/configParse.py"> | 592 | <entry file="file://$PROJECT_DIR$/configParse.py"> |
| 626 | <provider selected="true" editor-type-id="text-editor"> | 593 | <provider selected="true" editor-type-id="text-editor"> |
| 627 | <state relative-caret-position="272"> | 594 | <state relative-caret-position="272"> |
| 628 | <caret line="16" column="45" lean-forward="false" selection-start-line="16" selection-start-column="45" selection-end-line="16" selection-end-column="45" /> | 595 | <caret line="16" column="45" lean-forward="false" selection-start-line="16" selection-start-column="45" selection-end-line="16" selection-end-column="45" /> |
| 629 | </state> | 596 | </state> |
| 630 | </provider> | 597 | </provider> |
| 631 | </entry> | 598 | </entry> |
| 632 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/codecs.py"> | 599 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/codecs.py"> |
| 633 | <provider selected="true" editor-type-id="text-editor"> | 600 | <provider selected="true" editor-type-id="text-editor"> |
| 634 | <state relative-caret-position="5627"> | 601 | <state relative-caret-position="5627"> |
| 635 | <caret line="331" column="0" lean-forward="false" selection-start-line="331" selection-start-column="0" selection-end-line="331" selection-end-column="0" /> | 602 | <caret line="331" column="0" lean-forward="false" selection-start-line="331" selection-start-column="0" selection-end-line="331" selection-end-column="0" /> |
| 636 | </state> | 603 | </state> |
| 637 | </provider> | 604 | </provider> |
| 638 | </entry> | 605 | </entry> |
| 639 | <entry file="file://$PROJECT_DIR$/reports/report/Test_region_grade_school.Getrades_2017-12-13_11-29-12.html" /> | 606 | <entry file="file://$PROJECT_DIR$/reports/report/Test_region_grade_school.Getrades_2017-12-13_11-29-12.html" /> |
| 640 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/HtmlTestRunner/runner.py" /> | 607 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/HtmlTestRunner/runner.py" /> |
| 641 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py"> | 608 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py"> |
| 642 | <provider selected="true" editor-type-id="text-editor"> | 609 | <provider selected="true" editor-type-id="text-editor"> |
| 643 | <state relative-caret-position="372"> | 610 | <state relative-caret-position="372"> |
| 644 | <caret line="25" column="0" lean-forward="false" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" /> | 611 | <caret line="25" column="0" lean-forward="false" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" /> |
| 645 | </state> | 612 | </state> |
| 646 | </provider> | 613 | </provider> |
| 647 | </entry> | 614 | </entry> |
| 648 | <entry file="file://$PROJECT_DIR$/config.ini" /> | 615 | <entry file="file://$PROJECT_DIR$/config.ini" /> |
| 649 | <entry file="file://$PROJECT_DIR$/HTMLTestRunner.py"> | 616 | <entry file="file://$PROJECT_DIR$/HTMLTestRunner.py"> |
| 650 | <provider selected="true" editor-type-id="text-editor"> | 617 | <provider selected="true" editor-type-id="text-editor"> |
| 651 | <state relative-caret-position="313"> | 618 | <state relative-caret-position="313"> |
| 652 | <caret line="188" column="6" lean-forward="true" selection-start-line="185" selection-start-column="4" selection-end-line="296" selection-end-column="3" /> | 619 | <caret line="188" column="6" lean-forward="true" selection-start-line="185" selection-start-column="4" selection-end-line="296" selection-end-column="3" /> |
| 653 | <folding> | 620 | <folding> |
| 654 | <element signature="e#8852#10678#0" expanded="false" /> | 621 | <element signature="e#8852#10678#0" expanded="false" /> |
| 655 | </folding> | 622 | </folding> |
| 656 | </state> | 623 | </state> |
| 657 | </provider> | 624 | </provider> |
| 658 | </entry> | 625 | </entry> |
| 659 | <entry file="file://$PROJECT_DIR$/HTMLTestRunner_bak.py"> | 626 | <entry file="file://$PROJECT_DIR$/HTMLTestRunner_bak.py"> |
| 660 | <provider selected="true" editor-type-id="text-editor"> | 627 | <provider selected="true" editor-type-id="text-editor"> |
| 661 | <state relative-caret-position="0"> | 628 | <state relative-caret-position="0"> |
| 662 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | 629 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
| 663 | </state> | 630 | </state> |
| 664 | </provider> | 631 | </provider> |
| 665 | </entry> | 632 | </entry> |
| 666 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/suite.py"> | ||
| 667 | <provider selected="true" editor-type-id="text-editor"> | ||
| 668 | <state relative-caret-position="149"> | ||
| 669 | <caret line="83" column="0" lean-forward="false" selection-start-line="83" selection-start-column="0" selection-end-line="83" selection-end-column="0" /> | ||
| 670 | <folding /> | ||
| 671 | </state> | ||
| 672 | </provider> | ||
| 673 | </entry> | ||
| 674 | <entry file="file://$PROJECT_DIR$/test_suites/test_elecCard.py"> | 633 | <entry file="file://$PROJECT_DIR$/test_suites/test_elecCard.py"> |
| 675 | <provider selected="true" editor-type-id="text-editor"> | 634 | <provider selected="true" editor-type-id="text-editor"> |
| 676 | <state relative-caret-position="0"> | 635 | <state relative-caret-position="0"> |
| 677 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="23" /> | 636 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="23" /> |
| 678 | </state> | 637 | </state> |
| 679 | </provider> | 638 | </provider> |
| 680 | </entry> | 639 | </entry> |
| 681 | <entry file="file://$PROJECT_DIR$/data_fixture/authCode.py" /> | 640 | <entry file="file://$PROJECT_DIR$/data_fixture/authCode.py" /> |
| 682 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_check.py"> | 641 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_check.py"> |
| 683 | <provider selected="true" editor-type-id="text-editor"> | 642 | <provider selected="true" editor-type-id="text-editor"> |
| 684 | <state relative-caret-position="136"> | 643 | <state relative-caret-position="136"> |
| 685 | <caret line="8" column="44" lean-forward="true" selection-start-line="8" selection-start-column="44" selection-end-line="8" selection-end-column="44" /> | 644 | <caret line="8" column="44" lean-forward="true" selection-start-line="8" selection-start-column="44" selection-end-line="8" selection-end-column="44" /> |
| 686 | <folding /> | ||
| 687 | </state> | 645 | </state> |
| 688 | </provider> | 646 | </provider> |
| 689 | </entry> | 647 | </entry> |
| 690 | <entry file="file://$PROJECT_DIR$/data_fixture/test_verify.py"> | 648 | <entry file="file://$PROJECT_DIR$/data_fixture/test_verify.py"> |
| 691 | <provider selected="true" editor-type-id="text-editor"> | 649 | <provider selected="true" editor-type-id="text-editor"> |
| 692 | <state relative-caret-position="187"> | 650 | <state relative-caret-position="187"> |
| 693 | <caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" /> | 651 | <caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" /> |
| 694 | </state> | 652 | </state> |
| 695 | </provider> | 653 | </provider> |
| 696 | </entry> | 654 | </entry> |
| 697 | <entry file="file://$PROJECT_DIR$/test_cases/region_grade_school.py"> | 655 | <entry file="file://$PROJECT_DIR$/test_cases/region_grade_school.py"> |
| 698 | <provider selected="true" editor-type-id="text-editor"> | 656 | <provider selected="true" editor-type-id="text-editor"> |
| 699 | <state relative-caret-position="340"> | 657 | <state relative-caret-position="340"> |
| 700 | <caret line="20" column="81" lean-forward="true" selection-start-line="8" selection-start-column="0" selection-end-line="20" selection-end-column="81" /> | 658 | <caret line="20" column="81" lean-forward="true" selection-start-line="8" selection-start-column="0" selection-end-line="20" selection-end-column="81" /> |
| 701 | <folding> | ||
| 702 | <element signature="e#47#62#0" expanded="false" /> | ||
| 703 | </folding> | ||
| 704 | </state> | 659 | </state> |
| 705 | </provider> | 660 | </provider> |
| 706 | </entry> | 661 | </entry> |
| 707 | <entry file="file://$PROJECT_DIR$/test_cases/252ED989-0B16-4AB7-81C1-974ABCF6CA11.png" /> | 662 | <entry file="file://$PROJECT_DIR$/test_cases/252ED989-0B16-4AB7-81C1-974ABCF6CA11.png" /> |
| 708 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py"> | 663 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py"> |
| 709 | <provider selected="true" editor-type-id="text-editor"> | 664 | <provider selected="true" editor-type-id="text-editor"> |
| 710 | <state relative-caret-position="240"> | 665 | <state relative-caret-position="240"> |
| 711 | <caret line="166" column="0" lean-forward="false" selection-start-line="166" selection-start-column="0" selection-end-line="166" selection-end-column="0" /> | 666 | <caret line="166" column="0" lean-forward="false" selection-start-line="166" selection-start-column="0" selection-end-line="166" selection-end-column="0" /> |
| 712 | <folding /> | 667 | <folding /> |
| 713 | </state> | 668 | </state> |
| 714 | </provider> | 669 | </provider> |
| 715 | </entry> | 670 | </entry> |
| 716 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_setUp.py"> | 671 | <entry file="file://$PROJECT_DIR$/report/test_report.html"> |
| 717 | <provider selected="true" editor-type-id="text-editor"> | 672 | <provider selected="true" editor-type-id="text-editor"> |
| 718 | <state relative-caret-position="209"> | 673 | <state relative-caret-position="0"> |
| 719 | <caret line="102" column="26" lean-forward="true" selection-start-line="102" selection-start-column="26" selection-end-line="102" selection-end-column="26" /> | 674 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
| 720 | <folding /> | ||
| 721 | </state> | 675 | </state> |
| 722 | </provider> | 676 | </provider> |
| 723 | </entry> | 677 | </entry> |
| 724 | <entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py"> | 678 | <entry file="file://$PROJECT_DIR$/test_cases/debugggggg.py"> |
| 725 | <provider selected="true" editor-type-id="text-editor"> | 679 | <provider selected="true" editor-type-id="text-editor"> |
| 726 | <state relative-caret-position="169"> | 680 | <state relative-caret-position="34"> |
| 727 | <caret line="1595" column="0" lean-forward="false" selection-start-line="1595" selection-start-column="0" selection-end-line="1595" selection-end-column="0" /> | 681 | <caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" /> |
| 728 | <folding /> | 682 | <folding /> |
| 729 | </state> | 683 | </state> |
| 730 | </provider> | 684 | </provider> |
| 731 | </entry> | 685 | </entry> |
| 732 | <entry file="file://$PROJECT_DIR$/test_cases/press.py"> | 686 | <entry file="file://$PROJECT_DIR$/test_cases/__init__.py" /> |
| 687 | <entry file="file://$PROJECT_DIR$/data_fixture/__init__.py" /> | ||
| 688 | <entry file="file://$PROJECT_DIR$/test_cases/eleccard_setUp.py"> | ||
| 733 | <provider selected="true" editor-type-id="text-editor"> | 689 | <provider selected="true" editor-type-id="text-editor"> |
| 734 | <state relative-caret-position="0"> | 690 | <state relative-caret-position="187"> |
| 735 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="11" selection-end-column="0" /> | 691 | <caret line="15" column="23" lean-forward="true" selection-start-line="15" selection-start-column="23" selection-end-line="15" selection-end-column="23" /> |
| 736 | <folding /> | 692 | <folding /> |
| 737 | </state> | 693 | </state> |
| 738 | </provider> | 694 | </provider> |
| 739 | </entry> | 695 | </entry> |
| 740 | <entry file="file://$PROJECT_DIR$/HTMLTestRunner.py"> | 696 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py"> |
| 741 | <provider selected="true" editor-type-id="text-editor"> | 697 | <provider selected="true" editor-type-id="text-editor"> |
| 742 | <state relative-caret-position="165"> | 698 | <state relative-caret-position="150"> |
| 743 | <caret line="643" column="0" lean-forward="false" selection-start-line="643" selection-start-column="0" selection-end-line="643" selection-end-column="0" /> | 699 | <caret line="830" column="0" lean-forward="false" selection-start-line="830" selection-start-column="0" selection-end-line="830" selection-end-column="0" /> |
| 744 | <folding> | 700 | <folding /> |
| 745 | <element signature="e#8852#10678#0" expanded="false" /> | ||
| 746 | </folding> | ||
| 747 | </state> | 701 | </state> |
| 748 | </provider> | 702 | </provider> |
| 749 | </entry> | 703 | </entry> |
| 750 | <entry file="file://$PROJECT_DIR$/test_cases/personal_info.py"> | 704 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/suite.py"> |
| 751 | <provider selected="true" editor-type-id="text-editor"> | 705 | <provider selected="true" editor-type-id="text-editor"> |
| 752 | <state relative-caret-position="415"> | 706 | <state relative-caret-position="142"> |
| 753 | <caret line="251" column="26" lean-forward="false" selection-start-line="251" selection-start-column="26" selection-end-line="251" selection-end-column="26" /> | 707 | <caret line="83" column="0" lean-forward="false" selection-start-line="83" selection-start-column="0" selection-end-line="83" selection-end-column="0" /> |
| 754 | <folding> | 708 | <folding /> |
| 755 | <element signature="e#47#62#0" expanded="true" /> | ||
| 756 | </folding> | ||
| 757 | </state> | 709 | </state> |
| 758 | </provider> | 710 | </provider> |
| 759 | </entry> | 711 | </entry> |
| 760 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py"> | 712 | <entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/_pydev_imps/_pydev_execfile.py"> |
| 761 | <provider selected="true" editor-type-id="text-editor"> | 713 | <provider selected="true" editor-type-id="text-editor"> |
| 762 | <state relative-caret-position="176"> | 714 | <state relative-caret-position="289"> |
| 763 | <caret line="1334" column="0" lean-forward="false" selection-start-line="1334" selection-start-column="0" selection-end-line="1334" selection-end-column="0" /> | 715 | <caret line="17" column="0" lean-forward="false" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" /> |
| 764 | <folding /> | 716 | <folding /> |
| 765 | </state> | 717 | </state> |
| 766 | </provider> | 718 | </provider> |
| 767 | </entry> | 719 | </entry> |
| 768 | <entry file="file://$PROJECT_DIR$/test_cases/parent_space.py"> | 720 | <entry file="file://$APPLICATION_HOME_DIR$/helpers/pydev/pydevd.py"> |
| 769 | <provider selected="true" editor-type-id="text-editor"> | 721 | <provider selected="true" editor-type-id="text-editor"> |
| 770 | <state relative-caret-position="713"> | 722 | <state relative-caret-position="224"> |
| 771 | <caret line="105" column="0" lean-forward="false" selection-start-line="105" selection-start-column="0" selection-end-line="105" selection-end-column="0" /> | 723 | <caret line="1595" column="0" lean-forward="false" selection-start-line="1595" selection-start-column="0" selection-end-line="1595" selection-end-column="0" /> |
| 772 | <folding> | 724 | <folding /> |
| 773 | <element signature="e#47#62#0" expanded="true" /> | ||
| 774 | <marker date="1514955274000" expanded="true" signature="2800:2884" ph="SELECT custo... ozing_customermachine" /> | ||
| 775 | </folding> | ||
| 776 | </state> | 725 | </state> |
| 777 | </provider> | 726 | </provider> |
| 778 | </entry> | 727 | </entry> |
| 779 | <entry file="file://$PROJECT_DIR$/test_cases/sub_account.py"> | 728 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py"> |
| 780 | <provider selected="true" editor-type-id="text-editor"> | 729 | <provider selected="true" editor-type-id="text-editor"> |
| 781 | <state relative-caret-position="423"> | 730 | <state relative-caret-position="-44"> |
| 782 | <caret line="51" column="41" lean-forward="true" selection-start-line="51" selection-start-column="41" selection-end-line="51" selection-end-column="41" /> | 731 | <caret line="611" column="51" lean-forward="true" selection-start-line="611" selection-start-column="51" selection-end-line="611" selection-end-column="51" /> |
| 783 | <folding> | 732 | <folding /> |
| 784 | <element signature="e#47#62#0" expanded="true" /> | ||
| 785 | </folding> | ||
| 786 | </state> | 733 | </state> |
| 787 | </provider> | 734 | </provider> |
| 788 | </entry> | 735 | </entry> |
| 789 | <entry file="file://$PROJECT_DIR$/report/test_report.html"> | 736 | <entry file="file://$PROJECT_DIR$/test_cases/register.py"> |
| 790 | <provider selected="true" editor-type-id="text-editor"> | 737 | <provider selected="true" editor-type-id="text-editor"> |
| 791 | <state relative-caret-position="0"> | 738 | <state relative-caret-position="160"> |
| 792 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | 739 | <caret line="210" column="34" lean-forward="true" selection-start-line="210" selection-start-column="34" selection-end-line="210" selection-end-column="34" /> |
| 793 | <folding /> | 740 | <folding> |
| 741 | <element signature="e#47#62#0" expanded="true" /> | ||
| 742 | </folding> | ||
| 794 | </state> | 743 | </state> |
| 795 | </provider> | 744 | </provider> |
| 796 | </entry> | 745 | </entry> |
| 797 | <entry file="file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py"> | 746 | <entry file="file://$PROJECT_DIR$/test_cases/press.py"> |
| 798 | <provider selected="true" editor-type-id="text-editor"> | 747 | <provider selected="true" editor-type-id="text-editor"> |
| 799 | <state relative-caret-position="359"> | 748 | <state relative-caret-position="312"> |
| 800 | <caret line="600" column="0" lean-forward="false" selection-start-line="600" selection-start-column="0" selection-end-line="600" selection-end-column="0" /> | 749 | <caret line="80" column="38" lean-forward="true" selection-start-line="80" selection-start-column="38" selection-end-line="80" selection-end-column="38" /> |
| 801 | <folding /> | 750 | <folding /> |
| 802 | </state> | 751 | </state> |
| 803 | </provider> | 752 | </provider> |
| 804 | </entry> | 753 | </entry> |
| 805 | <entry file="file://$PROJECT_DIR$/test_cases/debugggggg.py"> | 754 | <entry file="file://$PROJECT_DIR$/test_cases/sub_account.py"> |
| 806 | <provider selected="true" editor-type-id="text-editor"> | 755 | <provider selected="true" editor-type-id="text-editor"> |
| 807 | <state relative-caret-position="34"> | 756 | <state relative-caret-position="415"> |
| 808 | <caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" /> | 757 | <caret line="110" column="49" lean-forward="false" selection-start-line="110" selection-start-column="49" selection-end-line="110" selection-end-column="49" /> |
| 809 | <folding /> | 758 | <folding> |
| 759 | <element signature="e#47#62#0" expanded="true" /> | ||
| 760 | </folding> | ||
| 810 | </state> | 761 | </state> |
| 811 | </provider> | 762 | </provider> |
| 812 | </entry> | 763 | </entry> |
| 813 | <entry file="file://$PROJECT_DIR$/test_cases/__init__.py"> | 764 | <entry file="file://$PROJECT_DIR$/report/test_report copy.html"> |
| 814 | <provider selected="true" editor-type-id="text-editor"> | 765 | <provider selected="true" editor-type-id="text-editor"> |
| 815 | <state relative-caret-position="0"> | 766 | <state relative-caret-position="160"> |
| 816 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | 767 | <caret line="998" column="8" lean-forward="true" selection-start-line="998" selection-start-column="8" selection-end-line="998" selection-end-column="8" /> |
| 817 | <folding /> | 768 | <folding /> |
| 818 | </state> | 769 | </state> |
| 819 | </provider> | 770 | </provider> |
| 820 | </entry> | 771 | </entry> |
| 821 | <entry file="file://$PROJECT_DIR$/data_fixture/__init__.py"> | 772 | <entry file="file://$PROJECT_DIR$/data_fixture/mysql_db.py"> |
| 822 | <provider selected="true" editor-type-id="text-editor"> | 773 | <provider selected="true" editor-type-id="text-editor"> |
| 823 | <state relative-caret-position="0"> | 774 | <state relative-caret-position="388"> |
| 824 | <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | 775 | <caret line="44" column="77" lean-forward="true" selection-start-line="44" selection-start-column="52" selection-end-line="44" selection-end-column="77" /> |
| 825 | <folding /> | 776 | <folding> |
| 777 | <element signature="e#47#66#0" expanded="true" /> | ||
| 778 | <marker date="1516000191000" expanded="true" signature="1736:1756" ph="select * fro... " /> | ||
| 779 | <marker date="1516000191000" expanded="true" signature="1736:1758" ph="select * fro... missing_value" /> | ||
| 780 | <marker date="1516000191000" expanded="true" signature="1736:1782" ph="select count... missing_value" /> | ||
| 781 | <marker date="1516000191000" expanded="true" signature="1736:1783" ph="select count... missing_value" /> | ||
| 782 | </folding> | ||
| 826 | </state> | 783 | </state> |
| 827 | </provider> | 784 | </provider> |
| 828 | </entry> | 785 | </entry> |
| 829 | <entry file="file://$PROJECT_DIR$/test_cases/app_record_statistic.py"> | 786 | <entry file="file://$PROJECT_DIR$/HTMLTestRunner.py"> |
| 830 | <provider selected="true" editor-type-id="text-editor"> | 787 | <provider selected="true" editor-type-id="text-editor"> |
| 831 | <state relative-caret-position="306"> | 788 | <state relative-caret-position="150"> |
| 832 | <caret line="18" column="53" lean-forward="true" selection-start-line="18" selection-start-column="53" selection-end-line="18" selection-end-column="53" /> | 789 | <caret line="643" column="0" lean-forward="false" selection-start-line="643" selection-start-column="0" selection-end-line="643" selection-end-column="0" /> |
| 833 | <folding> | 790 | <folding> |
| 834 | <element signature="e#47#62#0" expanded="true" /> | 791 | <element signature="e#8852#10678#0" expanded="false" /> |
| 835 | </folding> | 792 | </folding> |
| 836 | </state> | 793 | </state> |
| 837 | </provider> | 794 | </provider> |
| 838 | </entry> | 795 | </entry> |
| 839 | <entry file="file://$PROJECT_DIR$/test_cases/subject_sync.py"> | 796 | <entry file="file://$PROJECT_DIR$/test_cases/parent_space.py"> |
| 840 | <provider selected="true" editor-type-id="text-editor"> | 797 | <provider selected="true" editor-type-id="text-editor"> |
| 841 | <state relative-caret-position="204"> | 798 | <state relative-caret-position="443"> |
| 842 | <caret line="12" column="0" lean-forward="true" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" /> | 799 | <caret line="101" column="100" lean-forward="true" selection-start-line="101" selection-start-column="100" selection-end-line="101" selection-end-column="100" /> |
| 843 | <folding> | 800 | <folding> |
| 844 | <element signature="e#47#62#0" expanded="true" /> | 801 | <element signature="e#47#62#0" expanded="true" /> |
| 802 | <marker date="1516000648000" expanded="true" signature="2794:2878" ph="SELECT custo... ozing_customermachine" /> | ||
| 845 | </folding> | 803 | </folding> |
| 846 | </state> | 804 | </state> |
| 847 | </provider> | 805 | </provider> |
| 848 | </entry> | 806 | </entry> |
| 849 | <entry file="file://$PROJECT_DIR$/data_fixture/create_testdata.py"> | 807 | <entry file="file://$PROJECT_DIR$/data_fixture/create_testdata.py"> |
| 850 | <provider selected="true" editor-type-id="text-editor"> | 808 | <provider selected="true" editor-type-id="text-editor"> |
| 851 | <state relative-caret-position="666"> | 809 | <state relative-caret-position="382"> |
| 852 | <caret line="356" column="79" lean-forward="false" selection-start-line="356" selection-start-column="67" selection-end-line="356" selection-end-column="79" /> | 810 | <caret line="32" column="21" lean-forward="true" selection-start-line="32" selection-start-column="21" selection-end-line="32" selection-end-column="21" /> |
data_fixture/__pycache__/create_testdata.cpython-36.pyc
No preview for this file type
data_fixture/__pycache__/mysql_db.cpython-36.pyc
No preview for this file type
data_fixture/create_testdata.py
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
| 3 | 3 | ||
| 4 | from data_fixture.mysql_db import DB | 4 | from data_fixture.mysql_db import DB |
| 5 | from data_fixture import config_data as Data | 5 | from data_fixture import config_data as Data |
| 6 | from datetime import datetime, date, timedelta | 6 | from datetime import datetime, date, timedelta |
| 7 | import time | 7 | import time |
| 8 | from data_fixture.config_data import HOST_BOSS | 8 | from data_fixture.config_data import HOST_BOSS |
| 9 | import requests | 9 | import requests |
| 10 | import calendar | 10 | import calendar |
| 11 | import uuid | 11 | import uuid |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | db = DB() | 14 | db = DB() |
| 15 | 15 | ||
| 16 | ## ********************************************************************************************************************* | 16 | ## ********************************************************************************************************************* |
| 17 | ## 数据库通用操作 | ||
| 18 | ## ********************************************************************************************************************* | ||
| 19 | def db_select_bysql(sql): | ||
| 20 | return db.select(sql) | ||
| 21 | |||
| 22 | def db_select(tabel_name, where_data_equal, where_data_unequal = None): | ||
| 23 | return db.select_(tabel_name, where_data_equal, where_data_unequal) | ||
| 24 | |||
| 25 | ## ********************************************************************************************************************* | ||
| 17 | ## 验证码 | 26 | ## 验证码 |
| 18 | ## ********************************************************************************************************************* | 27 | ## ********************************************************************************************************************* |
| 19 | def fet_authCode(mobile): | 28 | def fet_authCode(mobile): |
| 20 | url = HOST_BOSS + "/ozing/timer/user/fetchAuthCode" | 29 | url = HOST_BOSS + "/ozing/timer/user/fetchAuthCode" |
| 21 | headers = {'Accept': '*/*'} | 30 | headers = {'Accept': '*/*'} |
| 22 | postData = {'mobile': mobile, 'type': 'general'} | 31 | postData = {'mobile': mobile, 'type': 'general'} |
| 23 | r = requests.post(url, headers=headers, data=postData) | 32 | r = requests.post(url, headers=headers, data=postData) |
| 24 | result = r.json() | 33 | result = r.json() |
| 25 | if result['status'] == 100: | 34 | if result['status'] == 100: |
| 26 | return result['jsessionid'] | 35 | return result['jsessionid'] |
| 27 | else : | 36 | else : |
| 28 | raise FetchException('fetch auth code Error!') | 37 | raise FetchException('fetch auth code Error!') |
| 29 | 38 | ||
| 30 | 39 | ||
| 31 | class FetchException(Exception): | 40 | class FetchException(Exception): |
| 32 | pass | 41 | pass |
| 33 | 42 | ||
| 34 | ## ********************************************************************************************************************* | 43 | ## ********************************************************************************************************************* |
| 35 | ## 保卡 | 44 | ## 保卡 |
| 36 | ## ********************************************************************************************************************* | 45 | ## ********************************************************************************************************************* |
| 37 | # 保卡数据 -- 新建保卡 | 46 | # 保卡数据 -- 新建保卡 |
| 38 | def pre_elecCard(device_cus_bind='0', device_sam='0', device_cus_unbind='0'): | 47 | def pre_elecCard(device_cus_bind='0', device_sam='0', device_cus_unbind='0'): |
| 39 | 48 | ||
| 40 | if device_cus_bind != '0': | 49 | if device_cus_bind != '0': |
| 41 | # 客机,已绑定保卡 | 50 | # 客机,已绑定保卡 |
| 42 | select_customermachine = "select * from acornuser.ozing_customermachine where deviceNumber = '{}' ".format(device_cus_bind) | 51 | select_customermachine = "select * from acornuser.ozing_customermachine where deviceNumber = '{}' ".format(device_cus_bind) |
| 43 | select_machine_cus = "SELECT * FROM acornuser.ozing_machine where deviceNumber = '{}' ".format(device_cus_bind) | 52 | select_machine_cus = "SELECT * FROM acornuser.ozing_machine where deviceNumber = '{}' ".format(device_cus_bind) |
| 44 | insert_customermachine_tabel = 'acornuser.ozing_customermachine' | 53 | insert_customermachine_tabel = 'acornuser.ozing_customermachine' |
| 45 | insert_customermachine_data = { | 54 | insert_customermachine_data = { |
| 46 | 'deviceNumber': device_cus_bind, | 55 | 'deviceNumber': device_cus_bind, |
| 47 | 'userId': Data.USER_ID, | 56 | 'userId': Data.USER_ID, |
| 48 | 'customerName':'测试customer', | 57 | 'customerName':'测试customer', |
| 49 | 'customerAddress':'内蒙古巴彦淖尔市', | 58 | 'customerAddress':'内蒙古巴彦淖尔市', |
| 50 | 'customerPhone':'13822222222', | 59 | 'customerPhone':'13822222222', |
| 51 | 'buyTime': datetime.now().strftime("%Y-%m-%d %H:%M:%S"), | 60 | 'buyTime': datetime.now().strftime("%Y-%m-%d %H:%M:%S"), |
| 52 | 'buyAddress':'内蒙古巴彦淖尔市', | 61 | 'buyAddress':'内蒙古巴彦淖尔市', |
| 53 | 'alterSaleCall':'51518888', | 62 | 'alterSaleCall':'51518888', |
| 54 | 'cmstate': '1', | 63 | 'cmstate': '1', |
| 55 | 'createTime': datetime.now().strftime("%Y-%m-%d %H:%M:%S") | 64 | 'createTime': datetime.now().strftime("%Y-%m-%d %H:%M:%S") |
| 56 | } | 65 | } |
| 57 | insert_machine_cus_table = 'acornuser.ozing_machine' | 66 | insert_machine_cus_table = 'acornuser.ozing_machine' |
| 58 | insert_machine_cus_data = {'productModel': Data.MODEL, | 67 | insert_machine_cus_data = {'productModel': Data.MODEL, |
| 59 | 'deviceNumber': device_cus_bind, | 68 | 'deviceNumber': device_cus_bind, |
| 60 | 'macAddress': Data.MAC_CUS_BIND, | 69 | 'macAddress': Data.MAC_CUS_BIND, |
| 61 | 'state': '1' | 70 | 'state': '1' |
| 62 | } | 71 | } |
| 63 | if db.select(select_customermachine): | 72 | if db.select(select_customermachine): |
| 64 | pass | 73 | pass |
| 65 | else: | 74 | else: |
| 66 | db.insert(insert_customermachine_tabel, insert_customermachine_data) | 75 | db.insert(insert_customermachine_tabel, insert_customermachine_data) |
| 67 | 76 | ||
| 68 | if db.select(select_machine_cus): | 77 | if db.select(select_machine_cus): |
| 69 | pass | 78 | pass |
| 70 | else: | 79 | else: |
| 71 | db.insert(insert_machine_cus_table, insert_machine_cus_data) | 80 | db.insert(insert_machine_cus_table, insert_machine_cus_data) |
| 72 | 81 | ||
| 73 | # 样机 | 82 | # 样机 |
| 74 | if device_sam !='0': | 83 | if device_sam !='0': |
| 75 | select_samplemachine = "SELECT * FROM acornuser.ozing_samplemachine where deviceNumber = '{}' ".format(device_sam) | 84 | select_samplemachine = "SELECT * FROM acornuser.ozing_samplemachine where deviceNumber = '{}' ".format(device_sam) |
| 76 | select_machine_sam = "SELECT * FROM acornuser.ozing_machine where deviceNumber = '{}' ".format(device_sam) | 85 | select_machine_sam = "SELECT * FROM acornuser.ozing_machine where deviceNumber = '{}' ".format(device_sam) |
| 77 | insert_samplemachine_tabel = 'acornuser.ozing_samplemachine' | 86 | insert_samplemachine_tabel = 'acornuser.ozing_samplemachine' |
| 78 | insert_samplemachine_data= {'deviceNumber': device_sam, | 87 | insert_samplemachine_data= {'deviceNumber': device_sam, |
| 79 | 'userId': Data.USER_ID, | 88 | 'userId': Data.USER_ID, |
| 80 | 'terminalAddress': "内蒙古巴彦淖尔市", | 89 | 'terminalAddress': "内蒙古巴彦淖尔市", |
| 81 | 'distributor': "新华书店", | 90 | 'distributor': "新华书店", |
| 82 | 'saleClerk':"张三", | 91 | 'saleClerk':"张三", |
| 83 | 'mobilePhone': "18622222222", | 92 | 'mobilePhone': "18622222222", |
| 84 | 'photo':'[{"photoUrl":"static/upload/online_api/samplePhoto/2017-12-13/b6480129-e720-4109-a455-6130fd640f16.jpg"},{"photoUrl":"static/upload/online_api/samplePhoto/2017-12-13/b8317fa4-cfa5-4ea4-91d4-3ca020e06bca.jpg"},{"photoUrl":"static/upload/online_api/samplePhoto/2017-12-13/110dc30b-34f1-4e0b-88e0-a030b8ab4af7.jpg"}]', | 93 | 'photo':'[{"photoUrl":"static/upload/online_api/samplePhoto/2017-12-13/b6480129-e720-4109-a455-6130fd640f16.jpg"},{"photoUrl":"static/upload/online_api/samplePhoto/2017-12-13/b8317fa4-cfa5-4ea4-91d4-3ca020e06bca.jpg"},{"photoUrl":"static/upload/online_api/samplePhoto/2017-12-13/110dc30b-34f1-4e0b-88e0-a030b8ab4af7.jpg"}]', |
| 85 | 'smstate': '1', | 94 | 'smstate': '1', |
| 86 | 'createTime': datetime.now().strftime('%Y-%m-%d %H:%M:%S') } | 95 | 'createTime': datetime.now().strftime('%Y-%m-%d %H:%M:%S') } |
| 87 | insert_machine_sam_tabel = 'acornuser.ozing_machine' | 96 | insert_machine_sam_tabel = 'acornuser.ozing_machine' |
| 88 | insert_machine_sam_data = {'productModel': Data.MODEL, | 97 | insert_machine_sam_data = {'productModel': Data.MODEL, |
| 89 | 'deviceNumber': device_sam, | 98 | 'deviceNumber': device_sam, |
| 90 | 'macAddress': Data.MAC_SAM, | 99 | 'macAddress': Data.MAC_SAM, |
| 91 | 'state': '0'} | 100 | 'state': '0'} |
| 92 | 101 | ||
| 93 | if db.select(select_samplemachine): | 102 | if db.select(select_samplemachine): |
| 94 | pass | 103 | pass |
| 95 | else: | 104 | else: |
| 96 | db.insert(insert_samplemachine_tabel, insert_samplemachine_data) | 105 | db.insert(insert_samplemachine_tabel, insert_samplemachine_data) |
| 97 | 106 | ||
| 98 | if db.select(select_machine_sam): | 107 | if db.select(select_machine_sam): |
| 99 | pass | 108 | pass |
| 100 | else: | 109 | else: |
| 101 | db.insert(insert_machine_sam_tabel, insert_machine_sam_data) | 110 | db.insert(insert_machine_sam_tabel, insert_machine_sam_data) |
| 102 | 111 | ||
| 103 | # 未绑定 -- 客机 | 112 | # 未绑定 -- 客机 |
| 104 | if device_cus_unbind != '0': | 113 | if device_cus_unbind != '0': |
| 105 | select_customermachine_unbind = "select * from acornuser.ozing_customermachine where deviceNumber = '{}' " \ | 114 | select_customermachine_unbind = "select * from acornuser.ozing_customermachine where deviceNumber = '{}' " \ |
| 106 | .format(device_cus_unbind) | 115 | .format(device_cus_unbind) |
| 107 | update_customermachine_unbind_tabel = 'acornuser.ozing_customermachine' | 116 | update_customermachine_unbind_tabel = 'acornuser.ozing_customermachine' |
| 108 | update_customermachine_unbind_set = {'deviceNumber':str(time.time())} | 117 | update_customermachine_unbind_set = {'deviceNumber':str(time.time())} |
| 109 | update_customermachine_unbind_where = {'deviceNumber': device_cus_unbind} | 118 | update_customermachine_unbind_where = {'deviceNumber': device_cus_unbind} |
| 110 | 119 | ||
| 111 | select_machine_cus_1 = "SELECT * FROM acornuser.ozing_machine where deviceNumber = '{}' ".format(device_cus_unbind) | 120 | select_machine_cus_1 = "SELECT * FROM acornuser.ozing_machine where deviceNumber = '{}' ".format(device_cus_unbind) |
| 112 | select_machine_cus_2 = "SELECT * FROM acornuser.ozing_machine where deviceNumber = '{}' and state = '1' ".format(device_cus_unbind) | 121 | select_machine_cus_2 = "SELECT * FROM acornuser.ozing_machine where deviceNumber = '{}' and state = '1' ".format(device_cus_unbind) |
| 113 | 122 | ||
| 114 | update_machine_cus_unbind_table = 'acornuser.ozing_machine' | 123 | update_machine_cus_unbind_table = 'acornuser.ozing_machine' |
| 115 | update_machine_cus_unbind_set = {'state': '1'} | 124 | update_machine_cus_unbind_set = {'state': '1'} |
| 116 | update_machine_cus_unbind_where = {'deviceNumber': device_cus_unbind} | 125 | update_machine_cus_unbind_where = {'deviceNumber': device_cus_unbind} |
| 117 | 126 | ||
| 118 | # 保卡表中有数据 | 127 | # 保卡表中有数据 |
| 119 | if db.select(select_customermachine_unbind): | 128 | if db.select(select_customermachine_unbind): |
| 120 | db.update(update_customermachine_unbind_tabel, update_customermachine_unbind_set, update_customermachine_unbind_where) | 129 | db.update(update_customermachine_unbind_tabel, update_customermachine_unbind_set, update_customermachine_unbind_where) |
| 121 | # 机器表中有数据,并且状态是1 | 130 | # 机器表中有数据,并且状态是1 |
| 122 | if db.select(select_machine_cus_1): | 131 | if db.select(select_machine_cus_1): |
| 123 | if db.select(select_machine_cus_2): | 132 | if db.select(select_machine_cus_2): |
| 124 | pass | 133 | pass |
| 125 | else: | 134 | else: |
| 126 | # update state =1 | 135 | # update state =1 |
| 127 | db.update(update_machine_cus_unbind_table, update_machine_cus_unbind_set, update_machine_cus_unbind_where) | 136 | db.update(update_machine_cus_unbind_table, update_machine_cus_unbind_set, update_machine_cus_unbind_where) |
| 128 | # 机器表中没数据 | 137 | # 机器表中没数据 |
| 129 | else: | 138 | else: |
| 130 | pass | 139 | pass |
| 131 | 140 | ||
| 132 | # #添加客机保卡 | 141 | # #添加客机保卡 |
| 133 | def pre_SetUpElecCard(): | 142 | def pre_SetUpElecCard(): |
| 134 | select_customermachine_new = "select * from acornuser.ozing_customermachine where deviceNumber = '{}' ".format(Data.DEVICE_NUMBER_NEW) | 143 | select_customermachine_new = "select * from acornuser.ozing_customermachine where deviceNumber = '{}' ".format(Data.DEVICE_NUMBER_NEW) |
| 135 | update_customermachine_new_tabel = 'acornuser.ozing_customermachine' | 144 | update_customermachine_new_tabel = 'acornuser.ozing_customermachine' |
| 136 | update_customermachine_new_set = {'deviceNumber':str(time.time())} | 145 | update_customermachine_new_set = {'deviceNumber':str(time.time())} |
| 137 | update_customermachine_new_where = {'deviceNumber': Data.DEVICE_NUMBER_NEW} | 146 | update_customermachine_new_where = {'deviceNumber': Data.DEVICE_NUMBER_NEW} |
| 138 | 147 | ||
| 139 | select_machine_new = "select * from acornuser.ozing_machine where deviceNumber = '{}' ".format(Data.DEVICE_NUMBER_NEW) | 148 | select_machine_new = "select * from acornuser.ozing_machine where deviceNumber = '{}' ".format(Data.DEVICE_NUMBER_NEW) |
| 140 | update_machine_new_tabel = 'acornuser.ozing_machine' | 149 | update_machine_new_tabel = 'acornuser.ozing_machine' |
| 141 | update_machine_new_set = {'deviceNumber': str(time.time())} | 150 | update_machine_new_set = {'deviceNumber': str(time.time())} |
| 142 | update_machine_new_where = {'deviceNumber': Data.DEVICE_NUMBER_NEW} | 151 | update_machine_new_where = {'deviceNumber': Data.DEVICE_NUMBER_NEW} |
| 143 | 152 | ||
| 144 | if db.select(select_customermachine_new): | 153 | if db.select(select_customermachine_new): |
| 145 | db.update(update_customermachine_new_tabel, update_customermachine_new_set, update_customermachine_new_where) | 154 | db.update(update_customermachine_new_tabel, update_customermachine_new_set, update_customermachine_new_where) |
| 146 | if db.select(select_machine_new): | 155 | if db.select(select_machine_new): |
| 147 | db.update(update_machine_new_tabel, update_machine_new_set, update_machine_new_where) | 156 | db.update(update_machine_new_tabel, update_machine_new_set, update_machine_new_where) |
| 148 | 157 | ||
| 149 | 158 | ||
| 150 | ## ********************************************************************************************************************* | 159 | ## ********************************************************************************************************************* |
| 151 | ## 子账户 | 160 | ## 子账户 |
| 152 | ## ********************************************************************************************************************* | 161 | ## ********************************************************************************************************************* |
| 153 | 162 | ||
| 154 | def pre_subAccount(parent_id, sub_account_id, status, deviceNumber=Data.DEVICE_NUMBER_CUS_BIND): #status: child status | 163 | def pre_subAccount(parent_id, sub_account_id, status, deviceNumber=Data.DEVICE_NUMBER_CUS_BIND): #status: child status |
| 155 | 164 | ||
| 156 | # 子账户数据 | 165 | # 子账户数据 |
| 157 | TABEL_CHILD_USER = 'acornuser.child_user' | 166 | TABEL_CHILD_USER = 'acornuser.child_user' |
| 158 | if status == 1 : # make sure only 1 sub account's status marked as '1' | 167 | if status == 1 : # make sure only 1 sub account's status marked as '1' |
| 159 | update_all_0_sub = "update acornuser.child_user set status = 0 where parent_id = '{}' and deviceNumber = '{}'" \ | 168 | update_all_0_sub = "update acornuser.child_user set status = 0 where parent_id = '{}' and deviceNumber = '{}'" \ |
| 160 | .format(parent_id, deviceNumber) | 169 | .format(parent_id, deviceNumber) |
| 161 | db.update_(update_all_0_sub) | 170 | db.update_(update_all_0_sub) |
| 162 | 171 | ||
| 163 | select_sub_acc = "select * from acornuser.child_user where parent_id = '{}' and subAccountId = '{}' ".format(parent_id, sub_account_id) | 172 | select_sub_acc = "select * from acornuser.child_user where parent_id = '{}' and subAccountId = '{}' ".format(parent_id, sub_account_id) |
| 164 | select_sub_acc_status = "select * from acornuser.child_user where parent_id = '{}' and subAccountId = '{}' " \ | 173 | select_sub_acc_status = "select * from acornuser.child_user where parent_id = '{}' and subAccountId = '{}' " \ |
| 165 | "and status = {} ".format(parent_id, sub_account_id, status) | 174 | "and status = {} ".format(parent_id, sub_account_id, status) |
| 166 | update_set = {'status': status} | 175 | update_set = {'status': status} |
| 167 | update_where = {'subAccountId': sub_account_id } | 176 | update_where = {'subAccountId': sub_account_id } |
| 168 | insert_data = {'parent_id':parent_id, | 177 | insert_data = {'parent_id':parent_id, |
| 169 | 'image': Data.SUB_ACC_IMAGE, | 178 | 'image': Data.SUB_ACC_IMAGE, |
| 170 | 'name' : '测试sub', | 179 | 'name' : '测试sub', |
| 171 | 'grade_id':'6', | 180 | 'grade_id':'6', |
| 172 | 'school_id': Data.SUB_ACC_SCHOOL_ID_2, | 181 | 'school_id': Data.SUB_ACC_SCHOOL_ID_2, |
| 173 | 'region_id': Data.SUB_ACC_REGION_ID_2, | 182 | 'region_id': Data.SUB_ACC_REGION_ID_2, |
| 174 | 'status':status, | 183 | 'status':status, |
| 175 | 'region_name': Data.SUB_ACC_REGION_NAME_2, | 184 | 'region_name': Data.SUB_ACC_REGION_NAME_2, |
| 176 | 'deviceNumber':Data.DEVICE_NUMBER_CUS_BIND, | 185 | 'deviceNumber':Data.DEVICE_NUMBER_CUS_BIND, |
| 177 | 'subAccountId':sub_account_id | 186 | 'subAccountId':sub_account_id |
| 178 | } | 187 | } |
| 179 | 188 | ||
| 180 | if db.select(select_sub_acc_status): | 189 | if db.select(select_sub_acc_status): |
| 181 | pass | 190 | pass |
| 182 | elif db.select(select_sub_acc): | 191 | elif db.select(select_sub_acc): |
| 183 | db.update(TABEL_CHILD_USER, update_set, update_where) | 192 | db.update(TABEL_CHILD_USER, update_set, update_where) |
| 184 | else: | 193 | else: |
| 185 | db.insert(TABEL_CHILD_USER, insert_data) | 194 | db.insert(TABEL_CHILD_USER, insert_data) |
| 186 | 195 | ||
| 187 | 196 | ||
| 188 | #主账户数据 | 197 | #主账户数据 |
| 189 | select_acc_1 = "select * from acornuser.acorn_user_status where userId = '{}' and deviceNumber = '{}' " \ | 198 | select_acc_1 = "select * from acornuser.acorn_user_status where userId = '{}' and deviceNumber = '{}' " \ |
| 190 | .format(parent_id, deviceNumber) | 199 | .format(parent_id, deviceNumber) |
| 191 | if status == 1: # if child status == 1, parent status should be 0 | 200 | if status == 1: # if child status == 1, parent status should be 0 |
| 192 | select_acc_2 = "select * from acornuser.acorn_user_status where userId = '{}' and deviceNumber = '{}' and status = 0 " \ | 201 | select_acc_2 = "select * from acornuser.acorn_user_status where userId = '{}' and deviceNumber = '{}' and status = 0 " \ |
| 193 | .format(parent_id, deviceNumber) | 202 | .format(parent_id, deviceNumber) |
| 194 | 203 | ||
| 195 | insert_data_parent_0 = {'userId': parent_id, | 204 | insert_data_parent_0 = {'userId': parent_id, |
| 196 | 'status': 0, | 205 | 'status': 0, |
| 197 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND | 206 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND |
| 198 | } | 207 | } |
| 199 | set_0 = {'status': 0} | 208 | set_0 = {'status': 0} |
| 200 | where = {'userId': parent_id, | 209 | where = {'userId': parent_id, |
| 201 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND | 210 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND |
| 202 | } | 211 | } |
| 203 | 212 | ||
| 204 | if db.select(select_acc_2): | 213 | if db.select(select_acc_2): |
| 205 | pass | 214 | pass |
| 206 | elif db.select(select_acc_1): | 215 | elif db.select(select_acc_1): |
| 207 | db.update("acornuser.acorn_user_status", set_0, where) | 216 | db.update("acornuser.acorn_user_status", set_0, where) |
| 208 | else: | 217 | else: |
| 209 | db.insert("acornuser.acorn_user_status", insert_data_parent_0) | 218 | db.insert("acornuser.acorn_user_status", insert_data_parent_0) |
| 210 | else: # if child status == 0, parent status should be 1 | 219 | else: # if child status == 0, parent status should be 1 |
| 211 | select_acc_3 = "select * from acornuser.acorn_user_status where userId = '{}' and deviceNumber = '{}' and status = 1 " \ | 220 | select_acc_3 = "select * from acornuser.acorn_user_status where userId = '{}' and deviceNumber = '{}' and status = 1 " \ |
| 212 | .format(parent_id, deviceNumber) | 221 | .format(parent_id, deviceNumber) |
| 213 | set_1 = {'status': 1} | 222 | set_1 = {'status': 1} |
| 214 | where = {'userId': parent_id, | 223 | where = {'userId': parent_id, |
| 215 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND | 224 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND |
| 216 | } | 225 | } |
| 217 | insert_data_parent_1 = {'userId': parent_id, | 226 | insert_data_parent_1 = {'userId': parent_id, |
| 218 | 'status': 1, | 227 | 'status': 1, |
| 219 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND | 228 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND |
| 220 | } | 229 | } |
| 221 | if db.select(select_acc_3): | 230 | if db.select(select_acc_3): |
| 222 | pass | 231 | pass |
| 223 | elif db.select(select_acc_1): | 232 | elif db.select(select_acc_1): |
| 224 | db.update("acornuser.acorn_user_status", set_1, where) | 233 | db.update("acornuser.acorn_user_status", set_1, where) |
| 225 | else: | 234 | else: |
| 226 | db.insert("acornuser.acorn_user_status", insert_data_parent_1) | 235 | db.insert("acornuser.acorn_user_status", insert_data_parent_1) |
| 227 | 236 | ||
| 228 | 237 | ||
| 229 | 238 | ||
| 230 | 239 | ||
| 231 | # 删除对应的parentID的所有数据 便于验证添加成功 | 240 | # 删除对应的parentID的所有数据 便于验证添加成功 |
| 232 | def pre_AddSubAccount(parent_Id): | 241 | def pre_AddSubAccount(parent_Id): |
| 233 | where_data = {'parent_Id': parent_Id} | 242 | where_data = {'parent_Id': parent_Id} |
| 234 | set_data = {'parent_Id': calendar.timegm(time.gmtime())} | 243 | set_data = {'parent_Id': calendar.timegm(time.gmtime())} |
| 235 | if db.select_('acornuser.child_user', where_data): | 244 | if db.select_('acornuser.child_user', where_data): |
| 236 | db.update('acornuser.child_user', set_data, where_data) | 245 | db.update('acornuser.child_user', set_data, where_data) |
| 237 | 246 | ||
| 238 | 247 | ||
| 239 | #检查signature存在 | 248 | #检查signature存在 |
| 240 | def checkSignatureExists(userId, type): | 249 | def checkSignatureExists(userId, type): |
| 241 | #主账户 | 250 | #主账户 |
| 242 | if type == 1: | 251 | if type == 1: |
| 243 | sql_1 = 'select * from acornuser.acorn_user_extra where user_id = {} '.format(userId) | 252 | sql_1 = 'select * from acornuser.acorn_user_extra where user_id = {} '.format(userId) |
| 244 | sql_2 = 'select * from acornuser.acorn_user_extra where user_id = {} and signature is not NULL'.format(userId) | 253 | sql_2 = 'select * from acornuser.acorn_user_extra where user_id = {} and signature is not NULL'.format(userId) |
| 245 | 254 | ||
| 246 | if db.select(sql_2): | 255 | if db.select(sql_2): |
| 247 | pass | 256 | pass |
| 248 | elif db.select(sql_1): | 257 | elif db.select(sql_1): |
| 249 | set = {'signature': '聪明的波利'} | 258 | set = {'signature': '聪明的波利'} |
| 250 | where = {'user_id': userId} | 259 | where = {'user_id': userId} |
| 251 | db.update('acornuser.acorn_user_extra', set, where) | 260 | db.update('acornuser.acorn_user_extra', set, where) |
| 252 | else: | 261 | else: |
| 253 | insert = {'user_id': userId, 'signature': '聪明的波利'} | 262 | insert = {'user_id': userId, 'signature': '聪明的波利'} |
| 254 | db.insert('acornuser.acorn_user_extra', insert) | 263 | db.insert('acornuser.acorn_user_extra', insert) |
| 255 | 264 | ||
| 256 | # 子账户 | 265 | # 子账户 |
| 257 | if type == 2: | 266 | if type == 2: |
| 258 | sql_1 = "select * from acornuser.subAccount_user_extra where sub_account_id = '{}' ".format(userId) | 267 | sql_1 = "select * from acornuser.subAccount_user_extra where sub_account_id = '{}' ".format(userId) |
| 259 | sql_2 = "select * from acornuser.subAccount_user_extra where sub_account_id = '{}'and signature is not NULL".format(userId) | 268 | sql_2 = "select * from acornuser.subAccount_user_extra where sub_account_id = '{}'and signature is not NULL".format(userId) |
| 260 | 269 | ||
| 261 | if db.select(sql_2): | 270 | if db.select(sql_2): |
| 262 | pass | 271 | pass |
| 263 | elif db.select(sql_1): | 272 | elif db.select(sql_1): |
| 264 | set = {'signature': '聪明的波利 sub~'} | 273 | set = {'signature': '聪明的波利 sub~'} |
| 265 | where = {'sub_account_id': userId} | 274 | where = {'sub_account_id': userId} |
| 266 | db.update('acornuser.subAccount_user_extra', set, where) | 275 | db.update('acornuser.subAccount_user_extra', set, where) |
| 267 | else: | 276 | else: |
| 268 | insert = {'sub_account_id': userId, 'signature': '聪明的波利 sub~'} | 277 | insert = {'sub_account_id': userId, 'signature': '聪明的波利 sub~'} |
| 269 | db.insert('acornuser.subAccount_user_extra', insert) | 278 | db.insert('acornuser.subAccount_user_extra', insert) |
| 270 | 279 | ||
| 271 | 280 | ||
| 272 | ## ********************************************************************************************************************* | 281 | ## ********************************************************************************************************************* |
| 273 | ## 教材版本 | 282 | ## 教材版本 |
| 274 | ## ********************************************************************************************************************* | 283 | ## ********************************************************************************************************************* |
| 275 | 284 | ||
| 276 | # 用户版本信息 | 285 | # 用户版本信息 |
| 277 | def pre_GetUserPressInfo(userId): | 286 | def pre_GetUserPressInfo(userId): |
| 278 | set = {'chinese': '北京师范大学出版社'} | 287 | set = {'chinese': '北京师范大学出版社'} |
| 279 | where = {'user_id': userId} | 288 | where = {'user_id': userId} |
| 280 | db.update('acornuser.user_press', set, where) | 289 | db.update('acornuser.user_press', set, where) |
| 281 | 290 | ||
| 282 | 291 | ||
| 283 | ## ********************************************************************************************************************* | 292 | ## ********************************************************************************************************************* |
| 284 | ## 登录注册 | 293 | ## 登录注册 |
| 285 | ## ********************************************************************************************************************* | 294 | ## ********************************************************************************************************************* |
| 286 | # 检查用户注册信息是否完整 | 295 | # 检查用户注册信息是否完整 |
| 287 | def pre_register_extrainfo_check(user_id, complete): | 296 | def pre_register_extrainfo_check(user_id, complete): |
| 288 | #不完整 | 297 | #不完整 |
| 289 | if complete == False: | 298 | if complete == False: |
| 290 | sql = "select * from acornuser.ozing_student where user_id = {} and region_id is NULL and school_id is NULL".format(user_id) | 299 | sql = "select * from acornuser.ozing_student where user_id = {} and region_id is NULL and school_id is NULL".format(user_id) |
| 291 | if db.select(sql): | 300 | if db.select(sql): |
| 292 | pass | 301 | pass |
| 293 | else: | 302 | else: |
| 294 | update_sql = "update acornuser.ozing_student set region_id = NULL, school_id = NULL where user_id = {}".format(user_id) | 303 | update_sql = "update acornuser.ozing_student set region_id = NULL, school_id = NULL where user_id = {}".format(user_id) |
| 295 | db.update_(update_sql) | 304 | db.update_(update_sql) |
| 296 | 305 | ||
| 297 | # 完整 | 306 | # 完整 |
| 298 | else: | 307 | else: |
| 299 | sql = "select * from acornuser.ozing_student where user_id = {} and region_id is not NULL and school_id is not NULL".format( | 308 | sql = "select * from acornuser.ozing_student where user_id = {} and region_id is not NULL and school_id is not NULL".format( |
| 300 | user_id) | 309 | user_id) |
| 301 | if db.select(sql): | 310 | if db.select(sql): |
| 302 | pass | 311 | pass |
| 303 | else: | 312 | else: |
| 304 | set = {'region_id': '140600', 'school_id': '496299', 'region_name':'江苏苏州吴中'} | 313 | set = {'region_id': '140600', 'school_id': '496299', 'region_name':'江苏苏州吴中'} |
| 305 | where = {'user_id': user_id} | 314 | where = {'user_id': user_id} |
| 306 | db.update('acornuser.ozing_student', set, where) | 315 | db.update('acornuser.ozing_student', set, where) |
| 307 | 316 | ||
| 308 | ## ********************************************************************************************************************* | 317 | ## ********************************************************************************************************************* |
| 309 | ## 最近观看视频 | 318 | ## 最近观看视频 |
| 310 | ## ********************************************************************************************************************* | 319 | ## ********************************************************************************************************************* |
| 311 | def pre_getRecentVideo(user_id, status): # status=0 novideo, status=1 has video | 320 | def pre_getRecentVideo(user_id, status): # status=0 novideo, status=1 has video |
| 312 | where = {'user_id': user_id} | 321 | where = {'user_id': user_id} |
| 313 | if status == 0 : | 322 | if status == 0 : |
| 314 | set = {'user_id': str(time.time())} | 323 | set = {'user_id': str(time.time())} |
| 315 | if db.select_('acornuser.user_video_watch', where): | 324 | if db.select_('acornuser.user_video_watch', where): |
| 316 | db.update('acornuser.user_video_watch', set, where) | 325 | db.update('acornuser.user_video_watch', set, where) |
| 317 | 326 | ||
| 318 | if status == 1 : | 327 | if status == 1 : |
| 319 | if db.select_('acornuser.user_video_watch', where): | 328 | if db.select_('acornuser.user_video_watch', where): |
| 320 | pass | 329 | pass |
| 321 | else: | 330 | else: |
| 322 | insert_data = {'user_id': user_id, | 331 | insert_data = {'user_id': user_id, |
| 323 | 'data_id': 486600, | 332 | 'data_id': 486600, |
| 324 | 'data_name':'人教7上_1 春_程诗尧.mpc', | 333 | 'data_name':'人教7上_1 春_程诗尧.mpc', |
| 325 | 'play_online_url':'http://fd.xuexiao100.com/mp4/黄冈视频/初中语文/7年级上 人民教育出版社_2017版/人教7上_1 春_程诗尧.mp4?k=e8f8a7429a42aff00cb96faa6f48821e', | 334 | 'play_online_url':'http://fd.xuexiao100.com/mp4/黄冈视频/初中语文/7年级上 人民教育出版社_2017版/人教7上_1 春_程诗尧.mp4?k=e8f8a7429a42aff00cb96faa6f48821e', |
| 326 | 'cover_url': 'http://hjxprodbucket.oss.aliyuncs.com/static/upload/boss_api/announcement/2017-10-18/34cfe338-2305-4aa0-96d8-c952be4dd800.jpg', | 335 | 'cover_url': 'http://hjxprodbucket.oss.aliyuncs.com/static/upload/boss_api/announcement/2017-10-18/34cfe338-2305-4aa0-96d8-c952be4dd800.jpg', |
| 327 | 'app_unique_name': 'famous-teacher', | 336 | 'app_unique_name': 'famous-teacher', |
| 328 | 'created_time': '2017-12-27 14:52:08', | 337 | 'created_time': '2017-12-27 14:52:08', |
| 329 | 'modified_time': '2017-12-27 14:52:08' | 338 | 'modified_time': '2017-12-27 14:52:08' |
| 330 | } | 339 | } |
| 331 | db.insert('acornuser.user_video_watch', insert_data) | 340 | db.insert('acornuser.user_video_watch', insert_data) |
| 332 | 341 | ||
| 333 | ## ********************************************************************************************************************* | 342 | ## ********************************************************************************************************************* |
| 334 | ## 手机号重复验证 | 343 | ## 手机号重复验证 |
| 335 | ## ********************************************************************************************************************* | 344 | ## ********************************************************************************************************************* |
| 336 | def pre_phoneUsedCheck(phone, used): #used = True :used | 345 | def pre_phoneUsedCheck(phone, used): #used = True :used |
| 337 | where = {'username': phone} | 346 | where = {'username': phone} |
| 338 | if used: | 347 | if used: |
| 339 | if db.select_('acornuser.acorn_user', where): | 348 | if db.select_('acornuser.acorn_user', where): |
| 340 | pass | 349 | pass |
| 341 | else: | 350 | else: |
| 342 | max_id = db.select('select max(id) from acornuser.acorn_user')[0]['max(id)'] | 351 | max_id = db.select('select max(id) from acornuser.acorn_user')[0]['max(id)'] |
| 343 | update_where = {'id': max_id - 150} | 352 | update_where = {'id': max_id - 150} |
| 344 | count = db.select_('acornuser.acorn_user', update_where) | 353 | count = db.select_('acornuser.acorn_user', update_where) |
| 345 | 354 | ||
| 346 | db.update('acornuser.acorn_user', where, update_where) | 355 | db.update('acornuser.acorn_user', where, update_where) |
| 347 | else: | 356 | else: |
| 348 | if db.select_('acornuser.acorn_user', where): | 357 | if db.select_('acornuser.acorn_user', where): |
| 349 | update_set = {'username': str(time.time())} | 358 | update_set = {'username': str(time.time())} |
| 350 | db.update('acornuser.acorn_user', update_set, where) | 359 | db.update('acornuser.acorn_user', update_set, where) |
| 351 | 360 | ||
| 352 | 361 | ||
| 353 | ## ********************************************************************************************************************* | 362 | ## ********************************************************************************************************************* |
| 354 | ## 家长控制 密码 | 363 | ## 家长控制 密码 |
| 355 | ## ********************************************************************************************************************* | 364 | ## ********************************************************************************************************************* |
| 356 | def get_parentSpace_password(device_number): | 365 | def get_parentSpace_password(device_number): |
| 357 | sql = "select password from acornuser.parents_space_pass where deviceNumber = '{}'".format(device_number) | 366 | sql = "select password from acornuser.parents_space_pass where deviceNumber = '{}'".format(device_number) |
| 358 | result = db.select(sql) | 367 | result = db.select(sql) |
| 359 | if result: | 368 | if result: |
| 360 | return result[0]['password'] | 369 | return result[0]['password'] |
| 361 | else: | 370 | else: |
| 362 | return '123456' | 371 | return '123456' |
| 363 | 372 | ||
| 364 | 373 | ||
| 365 | ## ********************************************************************************************************************* | 374 | ## ********************************************************************************************************************* |
| 366 | ## 家长控制 app使用统计 | 375 | ## 家长控制 app使用统计 |
| 367 | ## ********************************************************************************************************************* | 376 | ## ********************************************************************************************************************* |
| 368 | # "now" format: timestamp , create app using data about this week, month, year, last year(according 'now' time) | 377 | # "now" format: timestamp , create app using data about this week, month, year, last year(according 'now' time) |
| 369 | def create_app_use_record(now, user_id, device_number): | 378 | def create_app_use_record(now, user_id, device_number): |
| 370 | today = date.fromtimestamp(now) | 379 | today = date.fromtimestamp(now) |
| 371 | year_start_time = int(str(time.mktime(date(today.year, 1, 1).timetuple())).split('.')[0]) | 380 | year_start_time = int(str(time.mktime(date(today.year, 1, 1).timetuple())).split('.')[0]) |
| 372 | where_equal = {'user_id':user_id, 'device_number':device_number} | 381 | where_equal = {'user_id':user_id, 'device_number':device_number} |
| 373 | where_unequal = ' time_end > {} '.format(year_start_time) | 382 | where_unequal = ' time_end > {} '.format(year_start_time) |
| 374 | if db.select_('analytics.app_record', where_equal, where_unequal): # data existing | 383 | if db.select_('analytics.app_record', where_equal, where_unequal): # data existing |
| 375 | update_data = "update analytics.app_record set device_number = '{}' where user_id = '{}' and device_number = '{}' " \ | 384 | update_data = "update analytics.app_record set device_number = '{}' where user_id = '{}' and device_number = '{}' " \ |
| 376 | .format(str(time.time()), user_id, device_number) | 385 | .format(str(time.time()), user_id, device_number) |
| 377 | db.update_(update_data) | 386 | db.update_(update_data) |
| 378 | study_apps = [{'app_name':'百度英语资料大全', 'app_pid':'com.sailang.EnglishBook','category_id':'25', 'source_id':'1', \ | 387 | study_apps = [{'app_name':'百度英语资料大全', 'app_pid':'com.sailang.EnglishBook','category_id':'25', 'source_id':'1', \ |
| 379 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, | 388 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, |
| 380 | {'app_name': '开心大学士', 'app_pid': 'com.ksense.study','category_id':'26', 'source_id':'1', \ | 389 | {'app_name': '开心大学士', 'app_pid': 'com.ksense.study','category_id':'26', 'source_id':'1', \ |
| 381 | 'time_spent': 200, 'user_id': user_id, 'device_number': device_number}, | 390 | 'time_spent': 200, 'user_id': user_id, 'device_number': device_number}, |
| 382 | {'app_name': '驾考宝典', 'app_pid': 'com.handsgo.jiakao.android' ,'category_id':'27', 'source_id':'1', \ | 391 | {'app_name': '驾考宝典', 'app_pid': 'com.handsgo.jiakao.android' ,'category_id':'27', 'source_id':'1', \ |
| 383 | 'time_spent': 300, 'user_id': user_id, 'device_number': device_number}, | 392 | 'time_spent': 300, 'user_id': user_id, 'device_number': device_number}, |
| 384 | {'app_name': '我爱汉字', 'app_pid': 'com.cronlygames.hanzi' ,'category_id':'28', 'source_id':'1',\ | 393 | {'app_name': '我爱汉字', 'app_pid': 'com.cronlygames.hanzi' ,'category_id':'28', 'source_id':'1',\ |
| 385 | 'time_spent': 400, 'user_id': user_id, 'device_number': device_number}, | 394 | 'time_spent': 400, 'user_id': user_id, 'device_number': device_number}, |
| 386 | {'app_name': '拖拖乐3', 'app_pid': 'cn.com.wiisoft.tuotuo' ,'category_id':'57', 'source_id':'1', \ | 395 | {'app_name': '拖拖乐3', 'app_pid': 'cn.com.wiisoft.tuotuo' ,'category_id':'57', 'source_id':'1', \ |
| 387 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, | 396 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, |
| 388 | {'app_name': '幼儿数字算数学习', 'app_pid': 'com.syhrobert1991.infantlearning' ,'category_id':'25', \ | 397 | {'app_name': '幼儿数字算数学习', 'app_pid': 'com.syhrobert1991.infantlearning' ,'category_id':'25', \ |
| 389 | 'source_id':'1', 'time_spent': 200, 'user_id': user_id, 'device_number': device_number}, | 398 | 'source_id':'1', 'time_spent': 200, 'user_id': user_id, 'device_number': device_number}, |
| 390 | {'app_name': '轻松背单词之初中英语', 'app_pid': 'petpestzx.wordroid.model' ,'category_id':'26', \ | 399 | {'app_name': '轻松背单词之初中英语', 'app_pid': 'petpestzx.wordroid.model' ,'category_id':'26', \ |
| 391 | 'source_id':'2', 'time_spent': 300, 'user_id': user_id, 'device_number': device_number}, | 400 | 'source_id':'2', 'time_spent': 300, 'user_id': user_id, 'device_number': device_number}, |
| 392 | {'app_name': '有谱-爱学习(数理化)', 'app_pid': 'com.emingren.youpu' ,'category_id':'27', 'source_id':'2', \ | 401 | {'app_name': '有谱-爱学习(数理化)', 'app_pid': 'com.emingren.youpu' ,'category_id':'27', 'source_id':'2', \ |
| 393 | 'time_spent': 400, 'user_id': user_id, 'device_number': device_number}, | 402 | 'time_spent': 400, 'user_id': user_id, 'device_number': device_number}, |
| 394 | {'app_name': '疯狂音标', 'app_pid': 'com.neo.crazyphonetic' ,'category_id':'28', 'source_id':'2', \ | 403 | {'app_name': '疯狂音标', 'app_pid': 'com.neo.crazyphonetic' ,'category_id':'28', 'source_id':'2', \ |
| 395 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, | 404 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, |
| 396 | {'app_name': '互动作业V3.18.6', 'app_pid': 'com.v.study' ,'category_id':'57', 'source_id':'2', \ | 405 | {'app_name': '互动作业V3.18.6', 'app_pid': 'com.v.study' ,'category_id':'57', 'source_id':'2', \ |
| 397 | 'time_spent': 250, 'user_id': user_id, 'device_number': device_number}, | 406 | 'time_spent': 250, 'user_id': user_id, 'device_number': device_number}, |
| 398 | {'app_name': '发音背单词', 'app_pid': 'org.liberty.android.fantastischmemo' ,'category_id':'57', \ | 407 | {'app_name': '发音背单词', 'app_pid': 'org.liberty.android.fantastischmemo' ,'category_id':'57', \ |
| 399 | 'source_id':'2', 'time_spent': 350, 'user_id': user_id, 'device_number': device_number}, | 408 | 'source_id':'2', 'time_spent': 350, 'user_id': user_id, 'device_number': device_number}, |
| 400 | {'app_name': '语文100', 'app_pid': 'com.kk.kkyuwen' ,'category_id':'57', 'source_id':'2', \ | 409 | {'app_name': '语文100', 'app_pid': 'com.kk.kkyuwen' ,'category_id':'57', 'source_id':'2', \ |
| 401 | 'time_spent': 450, 'user_id': user_id, 'device_number': device_number} | 410 | 'time_spent': 450, 'user_id': user_id, 'device_number': device_number} |
| 402 | ] | 411 | ] |
| 403 | 412 | ||
| 404 | game_apps = [{'app_name': '小伴龙新', 'app_pid': 'com.xiaobanlong.main' ,'category_id':'37', 'source_id':'1',\ | 413 | game_apps = [{'app_name': '小伴龙新', 'app_pid': 'com.xiaobanlong.main' ,'category_id':'37', 'source_id':'1',\ |
| 405 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, | 414 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, |
| 406 | {'app_name': '三国群英传', 'app_pid': 'com.tencent.tmgp.sgqyz' ,'category_id':'38', 'source_id':'1', \ | 415 | {'app_name': '三国群英传', 'app_pid': 'com.tencent.tmgp.sgqyz' ,'category_id':'38', 'source_id':'1', \ |
| 407 | 'time_spent': 200, 'user_id': user_id, 'device_number': device_number}, | 416 | 'time_spent': 200, 'user_id': user_id, 'device_number': device_number}, |
| 408 | {'app_name': '童言童语', 'app_pid': 'com.lingshi.kids' ,'category_id':'39', 'source_id':'2', \ | 417 | {'app_name': '童言童语', 'app_pid': 'com.lingshi.kids' ,'category_id':'39', 'source_id':'2', \ |
| 409 | 'time_spent': 300, 'user_id': user_id, 'device_number': device_number}, | 418 | 'time_spent': 300, 'user_id': user_id, 'device_number': device_number}, |
| 410 | {'app_name': '从前啊', 'app_pid': 'com.mojie.longlongago' ,'category_id':'37', 'source_id':'2', \ | 419 | {'app_name': '从前啊', 'app_pid': 'com.mojie.longlongago' ,'category_id':'37', 'source_id':'2', \ |
| 411 | 'time_spent': 400, 'user_id': user_id, 'device_number': device_number}, | 420 | 'time_spent': 400, 'user_id': user_id, 'device_number': device_number}, |
| 412 | {'app_name': '永恒纪元', 'app_pid': 'com.m37.dtszj.uc' ,'category_id':'38', 'source_id':'2', \ | 421 | {'app_name': '永恒纪元', 'app_pid': 'com.m37.dtszj.uc' ,'category_id':'38', 'source_id':'2', \ |
| 413 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, | 422 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, |
| 414 | {'app_name': '我的世界新', 'app_pid': 'com.netease.mc.aligames' ,'category_id':'39', 'source_id':'2', \ | 423 | {'app_name': '我的世界新', 'app_pid': 'com.netease.mc.aligames' ,'category_id':'39', 'source_id':'2', \ |
| 415 | 'time_spent': 200, 'user_id': user_id, 'device_number': device_number}, | 424 | 'time_spent': 200, 'user_id': user_id, 'device_number': device_number}, |
| 416 | {'app_name': '球球大作战', 'app_pid': 'com.ztgame.bob', 'category_id': '37', 'source_id': '2', \ | 425 | {'app_name': '球球大作战', 'app_pid': 'com.ztgame.bob', 'category_id': '37', 'source_id': '2', \ |
| 417 | 'time_spent': 300, 'user_id': user_id, 'device_number': device_number}, | 426 | 'time_spent': 300, 'user_id': user_id, 'device_number': device_number}, |
| 418 | {'app_name': '葫芦侠我的世界', 'app_pid': 'com.huluxia.mctool', 'category_id': '38', 'source_id': '2',\ | 427 | {'app_name': '葫芦侠我的世界', 'app_pid': 'com.huluxia.mctool', 'category_id': '38', 'source_id': '2',\ |
| 419 | 'time_spent': 400, 'user_id': user_id, 'device_number': device_number}, | 428 | 'time_spent': 400, 'user_id': user_id, 'device_number': device_number}, |
| 420 | {'app_name': 'QQ游戏V6.8.7', 'app_pid': 'com.tencent.qqgame', 'category_id': '39', 'source_id': '2',\ | 429 | {'app_name': 'QQ游戏V6.8.7', 'app_pid': 'com.tencent.qqgame', 'category_id': '39', 'source_id': '2',\ |
| 421 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, | 430 | 'time_spent': 100, 'user_id': user_id, 'device_number': device_number}, |
| 422 | {'app_name': '99围棋最新', 'app_pid': 'com.r99weiqi.dvd', 'category_id': '37', 'source_id': '2', \ | 431 | {'app_name': '99围棋最新', 'app_pid': 'com.r99weiqi.dvd', 'category_id': '37', 'source_id': '2', \ |
| 423 | 'time_spent': 50, 'user_id': user_id, 'device_number': device_number}, | 432 | 'time_spent': 50, 'user_id': user_id, 'device_number': device_number}, |
| 424 | {'app_name': '凯蒂环球之旅', 'app_pid': 'com.tencent.HelloKitty', 'category_id': '37', 'source_id': '2',\ | 433 | {'app_name': '凯蒂环球之旅', 'app_pid': 'com.tencent.HelloKitty', 'category_id': '37', 'source_id': '2',\ |
| 425 | 'time_spent': 150, 'user_id': user_id, 'device_number': device_number}, | 434 | 'time_spent': 150, 'user_id': user_id, 'device_number': device_number}, |
| 426 | {'app_name': '贪吃蛇大作战', 'app_pid': 'com.wepie.snake.qihoo', 'category_id': '100', 'source_id': '2',\ | 435 | {'app_name': '贪吃蛇大作战', 'app_pid': 'com.wepie.snake.qihoo', 'category_id': '100', 'source_id': '2',\ |
| 427 | 'time_spent': 250, 'user_id': user_id, 'device_number': device_number} | 436 | 'time_spent': 250, 'user_id': user_id, 'device_number': device_number} |
| 428 | ] | 437 | ] |
| 429 | 438 | ||
| 430 | # get date of the last 7 days(include today) | 439 | # get date of the last 7 days(include today) |
| 431 | days = [] # the day should insert app records | 440 | days = [] # the day should insert app records |
| 432 | if today.month == 1: # the first month of this year | 441 | if today.month == 1: # the first month of this year |
| 433 | if today.day <= 7: # when today < 7th day of this month , 7 records chould cover this week ,this month, this year | 442 | if today.day <= 7: # when today < 7th day of this month , 7 records chould cover this week ,this month, this year |
| 434 | for i in range(0, 7): | 443 | for i in range(0, 7): |
| 435 | day_delta = timedelta(days=i) | 444 | day_delta = timedelta(days=i) |
| 436 | days.append(str(time.mktime((today - day_delta).timetuple())).split('.')[0]) | 445 | days.append(str(time.mktime((today - day_delta).timetuple())).split('.')[0]) |
| 437 | else: # when today > 7th day of this month , should create 8 records to cover this week ,this month, this year | 446 | else: # when today > 7th day of this month , should create 8 records to cover this week ,this month, this year |
| 438 | for i in range(0, 8): | 447 | for i in range(0, 8): |
| 439 | day_delta = timedelta(days=i) | 448 | day_delta = timedelta(days=i) |
| 440 | days.append(str(time.mktime((today - day_delta).timetuple())).split('.')[0]) | 449 | days.append(str(time.mktime((today - day_delta).timetuple())).split('.')[0]) |
| 441 | else: # create january data to cover this year | 450 | else: # create january data to cover this year |
| 442 | for i in range(0, 8): | 451 | for i in range(0, 8): |
| 443 | day_delta = timedelta(days=i) | 452 | day_delta = timedelta(days=i) |
| 444 | days.append(str(time.mktime((today - day_delta).timetuple())).split('.')[0]) | 453 | days.append(str(time.mktime((today - day_delta).timetuple())).split('.')[0]) |
| 445 | days.append(str(time.mktime(date(today.year, 1, 1).timetuple())).split('.')[0]) | 454 | days.append(str(time.mktime(date(today.year, 1, 1).timetuple())).split('.')[0]) |
| 446 | 455 | ||
| 447 | 456 | ||
| 448 | app_rec_to_insert = [] | 457 | app_rec_to_insert = [] |
| 449 | for day in days: | 458 | for day in days: |
| 450 | for i in range(0, 12): | 459 | for i in range(0, 12): |
| 451 | time_end_1 = {'time_end': int(day) + 28800 + i * 1000, 'id':str(uuid.uuid4()).replace('-', '')} | 460 | time_end_1 = {'time_end': int(day) + 28800 + i * 1000, 'id':str(uuid.uuid4()).replace('-', '')} |
| 452 | time_end_2 = {'time_end': int(day) + 29800 + i * 500, 'id':str(uuid.uuid4()).replace('-', '')} | 461 | time_end_2 = {'time_end': int(day) + 29800 + i * 500, 'id':str(uuid.uuid4()).replace('-', '')} |
| 453 | study_app = study_apps[i].copy() | 462 | study_app = study_apps[i].copy() |
| 454 | study_app.update(time_end_1) | 463 | study_app.update(time_end_1) |
| 455 | game_app = game_apps[i].copy() | 464 | game_app = game_apps[i].copy() |
| 456 | game_app.update(time_end_2) | 465 | game_app.update(time_end_2) |
| 457 | app_rec_to_insert.append(study_app) | 466 | app_rec_to_insert.append(study_app) |
| 458 | app_rec_to_insert.append(game_app) | 467 | app_rec_to_insert.append(game_app) |
| 459 | 468 | ||
| 460 | for rec in app_rec_to_insert: | 469 | for rec in app_rec_to_insert: |
| 461 | db.insert('analytics.app_record', rec) | 470 | db.insert('analytics.app_record', rec) |
| 462 | 471 | ||
| 463 | 472 | ||
| 464 | 473 | ||
| 465 | 474 | ||
| 466 | 475 | ||
| 467 | 476 | ||
| 468 | 477 | ||
| 469 | 478 | ||
| 470 | 479 | ||
| 471 | 480 | ||
| 472 | 481 | ||
| 473 | 482 | ||
| 474 | 483 | ||
| 475 | 484 | ||
| 476 | 485 | ||
| 477 | 486 | ||
| 478 | 487 | ||
| 479 | 488 | ||
| 480 | 489 | ||
| 481 | 490 | ||
| 482 | 491 | ||
| 483 | 492 | ||
| 484 | 493 | ||
| 485 | 494 |
data_fixture/mysql_db.py
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
| 3 | 3 | ||
| 4 | import configparser | 4 | import configparser |
| 5 | import pymysql.cursors | 5 | import pymysql.cursors |
| 6 | import os | 6 | import os |
| 7 | 7 | ||
| 8 | from . import config_data as Data | 8 | from . import config_data as Data |
| 9 | # | 9 | # |
| 10 | # base_dir = str(os.path.dirname(os.path.dirname(__file__))) | 10 | # base_dir = str(os.path.dirname(os.path.dirname(__file__))) |
| 11 | # config_dir = base_dir.replace('\\', '/') | 11 | # config_dir = base_dir.replace('\\', '/') |
| 12 | # config_path = config_dir + '/config.ini' | 12 | # config_path = config_dir + '/config.ini' |
| 13 | # | 13 | # |
| 14 | # cp = configparser.ConfigParser() | 14 | # cp = configparser.ConfigParser() |
| 15 | # cp.read(config_path) | 15 | # cp.read(config_path) |
| 16 | # DB_host = cp.get('mysqlconf', 'host') | 16 | # DB_host = cp.get('mysqlconf', 'host') |
| 17 | # DB_port = cp.get('mysqlconf', 'port') | 17 | # DB_port = cp.get('mysqlconf', 'port') |
| 18 | # DB_username = cp.get('mysqlconf', 'user') | 18 | # DB_username = cp.get('mysqlconf', 'user') |
| 19 | # DB_password = cp.get('mysqlconf', 'password') | 19 | # DB_password = cp.get('mysqlconf', 'password') |
| 20 | # DB_dbName = cp.get('mysqlconf', 'db_name') | 20 | # DB_dbName = cp.get('mysqlconf', 'db_name') |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | class DB: | 23 | class DB: |
| 24 | 24 | ||
| 25 | def __init__ (self): | 25 | def __init__ (self): |
| 26 | try: | 26 | try: |
| 27 | self.connection = pymysql.connect(host=Data.DB_HOST, | 27 | self.connection = pymysql.connect(host=Data.DB_HOST, |
| 28 | port=Data.DB_PORT, | 28 | port=Data.DB_PORT, |
| 29 | user=Data.DB_USERNAME, | 29 | user=Data.DB_USERNAME, |
| 30 | password=Data.DB_PASSWORD, | 30 | password=Data.DB_PASSWORD, |
| 31 | charset='utf8mb4', | 31 | charset='utf8mb4', |
| 32 | connect_timeout=3600, | 32 | connect_timeout=10000, |
| 33 | cursorclass=pymysql.cursors.DictCursor | 33 | cursorclass=pymysql.cursors.DictCursor |
| 34 | ) | 34 | ) |
| 35 | except pymysql.err.OperationalError as e: | 35 | except pymysql.err.OperationalError as e: |
| 36 | print ("MySql error %d: %s" % (e.args[0], e.args[1])) | 36 | print ("MySql error %d: %s" % (e.args[0], e.args[1])) |
| 37 | 37 | ||
| 38 | def select(self, sql): | 38 | def select(self, sql): |
| 39 | with self.connection.cursor() as cursor: | 39 | with self.connection.cursor() as cursor: |
| 40 | if cursor.execute(sql): | 40 | if cursor.execute(sql): |
| 41 | return cursor.fetchall() | 41 | return cursor.fetchall() |
| 42 | else: | 42 | else: |
| 43 | return None | 43 | return None |
| 44 | 44 | ||
| 45 | def select_(self, tabel_name, where_data_equal, where_data_unequal = None ): | 45 | def select_(self, tabel_name, where_data_equal, where_data_unequal = None ): |
| 46 | sql_where = ' and '.join("{} = '{}' ".format(key, value) for (key, value) in where_data_equal.items()) | 46 | sql_where = ' and '.join("{} = '{}' ".format(key, value) for (key, value) in where_data_equal.items()) |
| 47 | if where_data_unequal: | 47 | if where_data_unequal: |
| 48 | sql_where = sql_where + ' and ' + where_data_unequal | 48 | sql_where = sql_where + ' and ' + where_data_unequal |
| 49 | sql = 'select count(1) from ' + tabel_name + ' where ' + sql_where | 49 | sql = 'select count(1) from ' + tabel_name + ' where ' + sql_where |
| 50 | with self.connection.cursor() as cursor: | 50 | with self.connection.cursor() as cursor: |
| 51 | cursor.execute(sql) | 51 | cursor.execute(sql) |
| 52 | result = cursor.fetchone() | 52 | result = cursor.fetchone() |
| 53 | return result['count(1)'] | 53 | return result['count(1)'] |
| 54 | 54 | ||
| 55 | 55 | ||
| 56 | def insert(self, table_name, table_data): | 56 | def insert(self, table_name, table_data): |
| 57 | for key in table_data: | 57 | for key in table_data: |
| 58 | table_data[key] = " '" + str(table_data[key]) + "'" | 58 | table_data[key] = " '" + str(table_data[key]) + "'" |
| 59 | key = ','.join(table_data.keys()) | 59 | key = ','.join(table_data.keys()) |
| 60 | value = ','.join(table_data.values()) | 60 | value = ','.join(table_data.values()) |
| 61 | real_sql = 'INSERT INTO ' + table_name + " (" + key + " ) VALUES ( "\ | 61 | real_sql = 'INSERT INTO ' + table_name + " (" + key + " ) VALUES ( "\ |
| 62 | + value + " )" | 62 | + value + " )" |
| 63 | with self.connection.cursor() as cursor: | 63 | with self.connection.cursor() as cursor: |
| 64 | cursor.execute(real_sql) | 64 | cursor.execute(real_sql) |
| 65 | self.connection.commit() | 65 | self.connection.commit() |
| 66 | 66 | ||
| 67 | |||
| 67 | def update(self, table_name, set_data, where_data): | 68 | def update(self, table_name, set_data, where_data): |
| 68 | sql_set = ','.join("{}='{}'".format(key, value) for (key, value) in set_data.items()) | 69 | sql_set = ','.join("{}='{}'".format(key, value) for (key, value) in set_data.items()) |
| 69 | sql_where = ' and '.join("{}='{}'".format(key, value) for (key, value) in where_data.items()) | 70 | sql_where = ' and '.join("{}='{}'".format(key, value) for (key, value) in where_data.items()) |
| 70 | print(sql_set, sql_where) | 71 | print(sql_set, sql_where) |
| 71 | real_sql = "UPDATE " + table_name + " SET " + sql_set + " WHERE " + sql_where | 72 | real_sql = "UPDATE " + table_name + " SET " + sql_set + " WHERE " + sql_where |
| 72 | 73 | ||
| 73 | with self.connection.cursor() as cursor: | 74 | with self.connection.cursor() as cursor: |
| 74 | cursor.execute(real_sql) | 75 | cursor.execute(real_sql) |
| 75 | self.connection.commit() | 76 | self.connection.commit() |
| 76 | 77 | ||
| 77 | 78 | ||
| 78 | def update_(self, sql): | 79 | def update_(self, sql): |
| 79 | with self.connection.cursor() as cursor: | 80 | with self.connection.cursor() as cursor: |
| 80 | cursor.execute(sql) | 81 | cursor.execute(sql) |
| 81 | self.connection.commit() | 82 | self.connection.commit() |
| 82 | 83 | ||
| 83 | 84 | ||
| 84 | def close(self): | 85 | def close(self): |
| 85 | self.connection.close() | 86 | self.connection.close() |
| 86 | 87 | ||
| 87 | 88 | ||
| 88 | 89 | ||
| 89 | 90 |
report/test_report copy.html
| File was created | 1 | <?xml version="1.0" encoding="UTF-8"?> | |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 4 | <head> | ||
| 5 | <title>Unit Test Report</title> | ||
| 6 | <meta name="generator" content="HTMLTestRunner 0.8.2"/> | ||
| 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
| 8 | |||
| 9 | <style type="text/css" media="screen"> | ||
| 10 | body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; } | ||
| 11 | table { font-size: 100%; } | ||
| 12 | pre { } | ||
| 13 | |||
| 14 | /* -- heading ---------------------------------------------------------------------- */ | ||
| 15 | h1 { | ||
| 16 | font-size: 16pt; | ||
| 17 | color: gray; | ||
| 18 | } | ||
| 19 | .heading { | ||
| 20 | margin-top: 0ex; | ||
| 21 | margin-bottom: 1ex; | ||
| 22 | } | ||
| 23 | |||
| 24 | .heading .attribute { | ||
| 25 | margin-top: 1ex; | ||
| 26 | margin-bottom: 0; | ||
| 27 | } | ||
| 28 | |||
| 29 | .heading .description { | ||
| 30 | margin-top: 4ex; | ||
| 31 | margin-bottom: 6ex; | ||
| 32 | } | ||
| 33 | |||
| 34 | /* -- css div popup ------------------------------------------------------------------------ */ | ||
| 35 | a.popup_link { | ||
| 36 | } | ||
| 37 | |||
| 38 | a.popup_link:hover { | ||
| 39 | color: red; | ||
| 40 | } | ||
| 41 | |||
| 42 | .popup_window { | ||
| 43 | display: none; | ||
| 44 | position: relative; | ||
| 45 | left: 0px; | ||
| 46 | top: 0px; | ||
| 47 | /*border: solid #627173 1px; */ | ||
| 48 | padding: 10px; | ||
| 49 | background-color: #E6E6D6; | ||
| 50 | font-family: "Lucida Console", "Courier New", Courier, monospace; | ||
| 51 | text-align: left; | ||
| 52 | font-size: 8pt; | ||
| 53 | width: 500px; | ||
| 54 | } | ||
| 55 | |||
| 56 | } | ||
| 57 | /* -- report ------------------------------------------------------------------------ */ | ||
| 58 | #show_detail_line { | ||
| 59 | margin-top: 3ex; | ||
| 60 | margin-bottom: 1ex; | ||
| 61 | } | ||
| 62 | #result_table { | ||
| 63 | width: 80%; | ||
| 64 | border-collapse: collapse; | ||
| 65 | border: 1px solid #777; | ||
| 66 | } | ||
| 67 | #header_row { | ||
| 68 | font-weight: bold; | ||
| 69 | color: white; | ||
| 70 | background-color: #777; | ||
| 71 | } | ||
| 72 | #result_table td { | ||
| 73 | border: 1px solid #777; | ||
| 74 | padding: 2px; | ||
| 75 | } | ||
| 76 | #total_row { font-weight: bold; } | ||
| 77 | .passClass { background-color: #6c6; } | ||
| 78 | .failClass { background-color: #c60; } | ||
| 79 | .errorClass { background-color: #c00; } | ||
| 80 | .passCase { color: #6c6; } | ||
| 81 | .failCase { color: #c60; font-weight: bold; } | ||
| 82 | .errorCase { color: #c00; font-weight: bold; } | ||
| 83 | .hiddenRow { display: none; } | ||
| 84 | .testcase { margin-left: 2em; } | ||
| 85 | |||
| 86 | |||
| 87 | /* -- ending ---------------------------------------------------------------------- */ | ||
| 88 | #ending { | ||
| 89 | } | ||
| 90 | |||
| 91 | </style> | ||
| 92 | |||
| 93 | </head> | ||
| 94 | <body> | ||
| 95 | <script language="javascript" type="text/javascript"><!-- | ||
| 96 | output_list = Array(); | ||
| 97 | |||
| 98 | /* level - 0:Summary; 1:Failed; 2:All */ | ||
| 99 | function showCase(level) { | ||
| 100 | trs = document.getElementsByTagName("tr"); | ||
| 101 | for (var i = 0; i < trs.length; i++) { | ||
| 102 | tr = trs[i]; | ||
| 103 | id = tr.id; | ||
| 104 | if (id.substr(0,2) == 'ft') { | ||
| 105 | if (level < 1) { | ||
| 106 | tr.className = 'hiddenRow'; | ||
| 107 | } | ||
| 108 | else { | ||
| 109 | tr.className = ''; | ||
| 110 | } | ||
| 111 | } | ||
| 112 | if (id.substr(0,2) == 'pt') { | ||
| 113 | if (level > 1) { | ||
| 114 | tr.className = ''; | ||
| 115 | } | ||
| 116 | else { | ||
| 117 | tr.className = 'hiddenRow'; | ||
| 118 | } | ||
| 119 | } | ||
| 120 | } | ||
| 121 | } | ||
| 122 | |||
| 123 | |||
| 124 | function showClassDetail(cid, count) { | ||
| 125 | var id_list = Array(count); | ||
| 126 | var toHide = 1; | ||
| 127 | for (var i = 0; i < count; i++) { | ||
| 128 | tid0 = 't' + cid.substr(1) + '.' + (i+1); | ||
| 129 | tid = 'f' + tid0; | ||
| 130 | tr = document.getElementById(tid); | ||
| 131 | if (!tr) { | ||
| 132 | tid = 'p' + tid0; | ||
| 133 | tr = document.getElementById(tid); | ||
| 134 | } | ||
| 135 | id_list[i] = tid; | ||
| 136 | if (tr.className) { | ||
| 137 | toHide = 0; | ||
| 138 | } | ||
| 139 | } | ||
| 140 | for (var i = 0; i < count; i++) { | ||
| 141 | tid = id_list[i]; | ||
| 142 | if (toHide) { | ||
| 143 | document.getElementById('div_'+tid).style.display = 'none' | ||
| 144 | document.getElementById(tid).className = 'hiddenRow'; | ||
| 145 | } | ||
| 146 | else { | ||
| 147 | document.getElementById(tid).className = ''; | ||
| 148 | } | ||
| 149 | } | ||
| 150 | } | ||
| 151 | |||
| 152 | |||
| 153 | function showTestDetail(div_id){ | ||
| 154 | var details_div = document.getElementById(div_id) | ||
| 155 | var displayState = details_div.style.display | ||
| 156 | // alert(displayState) | ||
| 157 | if (displayState != 'block' ) { | ||
| 158 | displayState = 'block' | ||
| 159 | details_div.style.display = 'block' | ||
| 160 | } | ||
| 161 | else { | ||
| 162 | details_div.style.display = 'none' | ||
| 163 | } | ||
| 164 | } | ||
| 165 | |||
| 166 | |||
| 167 | function html_escape(s) { | ||
| 168 | s = s.replace(/&/g,'&'); | ||
| 169 | s = s.replace(/</g,'<'); | ||
| 170 | s = s.replace(/>/g,'>'); | ||
| 171 | return s; | ||
| 172 | } | ||
| 173 | |||
| 174 | /* obsoleted by detail in <div> | ||
| 175 | function showOutput(id, name) { | ||
| 176 | var w = window.open("", //url | ||
| 177 | name, | ||
| 178 | "resizable,scrollbars,status,width=800,height=450"); | ||
| 179 | d = w.document; | ||
| 180 | d.write("<pre>"); | ||
| 181 | d.write(html_escape(output_list[id])); | ||
| 182 | d.write("\n"); | ||
| 183 | d.write("<a href='javascript:window.close()'>close</a>\n"); | ||
| 184 | d.write("</pre>\n"); | ||
| 185 | d.close(); | ||
| 186 | } | ||
| 187 | */ | ||
| 188 | --></script> | ||
| 189 | |||
| 190 | <div class='heading'> | ||
| 191 | <h1>Unit Test Report</h1> | ||
| 192 | <p class='attribute'><strong>Start Time:</strong> 2018-01-15 11:22:52</p> | ||
| 193 | <p class='attribute'><strong>Duration:</strong> 0:01:10.454840</p> | ||
| 194 | <p class='attribute'><strong>Status:</strong> Pass 64 Failure 1 Error 7</p> | ||
| 195 | |||
| 196 | <p class='description'></p> | ||
| 197 | </div> | ||
| 198 | |||
| 199 | |||
| 200 | |||
| 201 | <p id='show_detail_line'>Show | ||
| 202 | <a href='javascript:showCase(0)'>Summary</a> | ||
| 203 | <a href='javascript:showCase(1)'>Failed</a> | ||
| 204 | <a href='javascript:showCase(2)'>All</a> | ||
| 205 | </p> | ||
| 206 | <table id='result_table'> | ||
| 207 | <colgroup> | ||
| 208 | <col align='left' /> | ||
| 209 | <col align='right' /> | ||
| 210 | <col align='right' /> | ||
| 211 | <col align='right' /> | ||
| 212 | <col align='right' /> | ||
| 213 | <col align='right' /> | ||
| 214 | </colgroup> | ||
| 215 | <tr id='header_row'> | ||
| 216 | <td>Test Group/Test case</td> | ||
| 217 | <td>Count</td> | ||
| 218 | <td>Pass</td> | ||
| 219 | <td>Fail</td> | ||
| 220 | <td>Error</td> | ||
| 221 | <td>View</td> | ||
| 222 | </tr> | ||
| 223 | |||
| 224 | <tr class='passClass'> | ||
| 225 | <td>app_record_statistic.AppRecordEveryday</td> | ||
| 226 | <td>1</td> | ||
| 227 | <td>1</td> | ||
| 228 | <td>0</td> | ||
| 229 | <td>0</td> | ||
| 230 | <td><a href="javascript:showClassDetail('c1',1)">Detail</a></td> | ||
| 231 | </tr> | ||
| 232 | |||
| 233 | <tr id='pt1.1' class='hiddenRow'> | ||
| 234 | <td class='none'><div class='testcase'>test_getAppRecordEveryday_success</div></td> | ||
| 235 | <td colspan='5' align='center'>pass</td> | ||
| 236 | </tr> | ||
| 237 | |||
| 238 | <tr class='passClass'> | ||
| 239 | <td>app_record_statistic.AppRecordOneday</td> | ||
| 240 | <td>1</td> | ||
| 241 | <td>1</td> | ||
| 242 | <td>0</td> | ||
| 243 | <td>0</td> | ||
| 244 | <td><a href="javascript:showClassDetail('c2',1)">Detail</a></td> | ||
| 245 | </tr> | ||
| 246 | |||
| 247 | <tr id='pt2.1' class='hiddenRow'> | ||
| 248 | <td class='none'><div class='testcase'>test_getAppRecordOneday_success</div></td> | ||
| 249 | <td colspan='5' align='center'>pass</td> | ||
| 250 | </tr> | ||
| 251 | |||
| 252 | <tr class='passClass'> | ||
| 253 | <td>app_record_statistic.AppRecordReset</td> | ||
| 254 | <td>2</td> | ||
| 255 | <td>2</td> | ||
| 256 | <td>0</td> | ||
| 257 | <td>0</td> | ||
| 258 | <td><a href="javascript:showClassDetail('c3',2)">Detail</a></td> | ||
| 259 | </tr> | ||
| 260 | |||
| 261 | <tr id='pt3.1' class='hiddenRow'> | ||
| 262 | <td class='none'><div class='testcase'>test_AppRecordReset_passwordError</div></td> | ||
| 263 | <td colspan='5' align='center'>pass</td> | ||
| 264 | </tr> | ||
| 265 | |||
| 266 | <tr id='pt3.2' class='hiddenRow'> | ||
| 267 | <td class='none'><div class='testcase'>test_AppRecordReset_success</div></td> | ||
| 268 | <td colspan='5' align='center'>pass</td> | ||
| 269 | </tr> | ||
| 270 | |||
| 271 | <tr class='passClass'> | ||
| 272 | <td>app_record_statistic.AppRecordSave</td> | ||
| 273 | <td>1</td> | ||
| 274 | <td>1</td> | ||
| 275 | <td>0</td> | ||
| 276 | <td>0</td> | ||
| 277 | <td><a href="javascript:showClassDetail('c4',1)">Detail</a></td> | ||
| 278 | </tr> | ||
| 279 | |||
| 280 | <tr id='pt4.1' class='hiddenRow'> | ||
| 281 | <td class='none'><div class='testcase'>test_AppRecordSave_success</div></td> | ||
| 282 | <td colspan='5' align='center'> | ||
| 283 | |||
| 284 | <!--css div popup start--> | ||
| 285 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt4.1')" > | ||
| 286 | pass</a> | ||
| 287 | |||
| 288 | <div id='div_pt4.1' class="popup_window"> | ||
| 289 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 290 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt4.1').style.display = 'none' " > | ||
| 291 | [x]</a> | ||
| 292 | </div> | ||
| 293 | <pre> | ||
| 294 | |||
| 295 | pt4.1: | ||
| 296 | |||
| 297 | </pre> | ||
| 298 | </div> | ||
| 299 | <!--css div popup end--> | ||
| 300 | |||
| 301 | </td> | ||
| 302 | </tr> | ||
| 303 | |||
| 304 | <tr class='passClass'> | ||
| 305 | <td>app_record_statistic.AppRecordStats</td> | ||
| 306 | <td>4</td> | ||
| 307 | <td>4</td> | ||
| 308 | <td>0</td> | ||
| 309 | <td>0</td> | ||
| 310 | <td><a href="javascript:showClassDetail('c5',4)">Detail</a></td> | ||
| 311 | </tr> | ||
| 312 | |||
| 313 | <tr id='pt5.1' class='hiddenRow'> | ||
| 314 | <td class='none'><div class='testcase'>test_getAppRecordStats_all_success</div></td> | ||
| 315 | <td colspan='5' align='center'>pass</td> | ||
| 316 | </tr> | ||
| 317 | |||
| 318 | <tr id='pt5.2' class='hiddenRow'> | ||
| 319 | <td class='none'><div class='testcase'>test_getAppRecordStats_month_success</div></td> | ||
| 320 | <td colspan='5' align='center'>pass</td> | ||
| 321 | </tr> | ||
| 322 | |||
| 323 | <tr id='pt5.3' class='hiddenRow'> | ||
| 324 | <td class='none'><div class='testcase'>test_getAppRecordStats_week_success</div></td> | ||
| 325 | <td colspan='5' align='center'>pass</td> | ||
| 326 | </tr> | ||
| 327 | |||
| 328 | <tr id='pt5.4' class='hiddenRow'> | ||
| 329 | <td class='none'><div class='testcase'>test_getAppRecordStats_year_success</div></td> | ||
| 330 | <td colspan='5' align='center'>pass</td> | ||
| 331 | </tr> | ||
| 332 | |||
| 333 | <tr class='passClass'> | ||
| 334 | <td>app_record_statistic.AppRecordToday</td> | ||
| 335 | <td>1</td> | ||
| 336 | <td>1</td> | ||
| 337 | <td>0</td> | ||
| 338 | <td>0</td> | ||
| 339 | <td><a href="javascript:showClassDetail('c6',1)">Detail</a></td> | ||
| 340 | </tr> | ||
| 341 | |||
| 342 | <tr id='pt6.1' class='hiddenRow'> | ||
| 343 | <td class='none'><div class='testcase'>test_AppRecordToday_success</div></td> | ||
| 344 | <td colspan='5' align='center'>pass</td> | ||
| 345 | </tr> | ||
| 346 | |||
| 347 | <tr class='passClass'> | ||
| 348 | <td>app_record_statistic.AppRecordTop</td> | ||
| 349 | <td>2</td> | ||
| 350 | <td>2</td> | ||
| 351 | <td>0</td> | ||
| 352 | <td>0</td> | ||
| 353 | <td><a href="javascript:showClassDetail('c7',2)">Detail</a></td> | ||
| 354 | </tr> | ||
| 355 | |||
| 356 | <tr id='pt7.1' class='hiddenRow'> | ||
| 357 | <td class='none'><div class='testcase'>test_getAppRecordTop_hjx</div></td> | ||
| 358 | <td colspan='5' align='center'>pass</td> | ||
| 359 | </tr> | ||
| 360 | |||
| 361 | <tr id='pt7.2' class='hiddenRow'> | ||
| 362 | <td class='none'><div class='testcase'>test_getAppRecordTop_other</div></td> | ||
| 363 | <td colspan='5' align='center'>pass</td> | ||
| 364 | </tr> | ||
| 365 | |||
| 366 | <tr class='passClass'> | ||
| 367 | <td>eleccard_check.CheckElecCardBind</td> | ||
| 368 | <td>3</td> | ||
| 369 | <td>3</td> | ||
| 370 | <td>0</td> | ||
| 371 | <td>0</td> | ||
| 372 | <td><a href="javascript:showClassDetail('c8',3)">Detail</a></td> | ||
| 373 | </tr> | ||
| 374 | |||
| 375 | <tr id='pt8.1' class='hiddenRow'> | ||
| 376 | <td class='none'><div class='testcase'>test_checkElecCard_customerMachine</div></td> | ||
| 377 | <td colspan='5' align='center'> | ||
| 378 | |||
| 379 | <!--css div popup start--> | ||
| 380 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt8.1')" > | ||
| 381 | pass</a> | ||
| 382 | |||
| 383 | <div id='div_pt8.1' class="popup_window"> | ||
| 384 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 385 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt8.1').style.display = 'none' " > | ||
| 386 | [x]</a> | ||
| 387 | </div> | ||
| 388 | <pre> | ||
| 389 | |||
| 390 | pt8.1: | ||
| 391 | |||
| 392 | </pre> | ||
| 393 | </div> | ||
| 394 | <!--css div popup end--> | ||
| 395 | |||
| 396 | </td> | ||
| 397 | </tr> | ||
| 398 | |||
| 399 | <tr id='pt8.2' class='hiddenRow'> | ||
| 400 | <td class='none'><div class='testcase'>test_checkElecCard_sampleMachine</div></td> | ||
| 401 | <td colspan='5' align='center'> | ||
| 402 | |||
| 403 | <!--css div popup start--> | ||
| 404 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt8.2')" > | ||
| 405 | pass</a> | ||
| 406 | |||
| 407 | <div id='div_pt8.2' class="popup_window"> | ||
| 408 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 409 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt8.2').style.display = 'none' " > | ||
| 410 | [x]</a> | ||
| 411 | </div> | ||
| 412 | <pre> | ||
| 413 | |||
| 414 | pt8.2: | ||
| 415 | |||
| 416 | </pre> | ||
| 417 | </div> | ||
| 418 | <!--css div popup end--> | ||
| 419 | |||
| 420 | </td> | ||
| 421 | </tr> | ||
| 422 | |||
| 423 | <tr id='pt8.3' class='hiddenRow'> | ||
| 424 | <td class='none'><div class='testcase'>test_checkElecCard_unbind</div></td> | ||
| 425 | <td colspan='5' align='center'> | ||
| 426 | |||
| 427 | <!--css div popup start--> | ||
| 428 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt8.3')" > | ||
| 429 | pass</a> | ||
| 430 | |||
| 431 | <div id='div_pt8.3' class="popup_window"> | ||
| 432 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 433 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt8.3').style.display = 'none' " > | ||
| 434 | [x]</a> | ||
| 435 | </div> | ||
| 436 | <pre> | ||
| 437 | |||
| 438 | pt8.3: | ||
| 439 | |||
| 440 | </pre> | ||
| 441 | </div> | ||
| 442 | <!--css div popup end--> | ||
| 443 | |||
| 444 | </td> | ||
| 445 | </tr> | ||
| 446 | |||
| 447 | <tr class='passClass'> | ||
| 448 | <td>eleccard_check.GetCardInfo</td> | ||
| 449 | <td>1</td> | ||
| 450 | <td>1</td> | ||
| 451 | <td>0</td> | ||
| 452 | <td>0</td> | ||
| 453 | <td><a href="javascript:showClassDetail('c9',1)">Detail</a></td> | ||
| 454 | </tr> | ||
| 455 | |||
| 456 | <tr id='pt9.1' class='hiddenRow'> | ||
| 457 | <td class='none'><div class='testcase'>test_getCardInfo_success</div></td> | ||
| 458 | <td colspan='5' align='center'> | ||
| 459 | |||
| 460 | <!--css div popup start--> | ||
| 461 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt9.1')" > | ||
| 462 | pass</a> | ||
| 463 | |||
| 464 | <div id='div_pt9.1' class="popup_window"> | ||
| 465 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 466 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt9.1').style.display = 'none' " > | ||
| 467 | [x]</a> | ||
| 468 | </div> | ||
| 469 | <pre> | ||
| 470 | |||
| 471 | pt9.1: | ||
| 472 | |||
| 473 | </pre> | ||
| 474 | </div> | ||
| 475 | <!--css div popup end--> | ||
| 476 | |||
| 477 | </td> | ||
| 478 | </tr> | ||
| 479 | |||
| 480 | <tr class='passClass'> | ||
| 481 | <td>eleccard_setUp.Card_Modify</td> | ||
| 482 | <td>2</td> | ||
| 483 | <td>2</td> | ||
| 484 | <td>0</td> | ||
| 485 | <td>0</td> | ||
| 486 | <td><a href="javascript:showClassDetail('c10',2)">Detail</a></td> | ||
| 487 | </tr> | ||
| 488 | |||
| 489 | <tr id='pt10.1' class='hiddenRow'> | ||
| 490 | <td class='none'><div class='testcase'>test_modifyCardInfo_address_success</div></td> | ||
| 491 | <td colspan='5' align='center'> | ||
| 492 | |||
| 493 | <!--css div popup start--> | ||
| 494 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt10.1')" > | ||
| 495 | pass</a> | ||
| 496 | |||
| 497 | <div id='div_pt10.1' class="popup_window"> | ||
| 498 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 499 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt10.1').style.display = 'none' " > | ||
| 500 | [x]</a> | ||
| 501 | </div> | ||
| 502 | <pre> | ||
| 503 | |||
| 504 | pt10.1: | ||
| 505 | |||
| 506 | </pre> | ||
| 507 | </div> | ||
| 508 | <!--css div popup end--> | ||
| 509 | |||
| 510 | </td> | ||
| 511 | </tr> | ||
| 512 | |||
| 513 | <tr id='pt10.2' class='hiddenRow'> | ||
| 514 | <td class='none'><div class='testcase'>test_modifyCardInfo_phone_success</div></td> | ||
| 515 | <td colspan='5' align='center'> | ||
| 516 | |||
| 517 | <!--css div popup start--> | ||
| 518 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt10.2')" > | ||
| 519 | pass</a> | ||
| 520 | |||
| 521 | <div id='div_pt10.2' class="popup_window"> | ||
| 522 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 523 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt10.2').style.display = 'none' " > | ||
| 524 | [x]</a> | ||
| 525 | </div> | ||
| 526 | <pre> | ||
| 527 | |||
| 528 | pt10.2: | ||
| 529 | |||
| 530 | </pre> | ||
| 531 | </div> | ||
| 532 | <!--css div popup end--> | ||
| 533 | |||
| 534 | </td> | ||
| 535 | </tr> | ||
| 536 | |||
| 537 | <tr class='passClass'> | ||
| 538 | <td>eleccard_setUp.SetToCustomer</td> | ||
| 539 | <td>1</td> | ||
| 540 | <td>1</td> | ||
| 541 | <td>0</td> | ||
| 542 | <td>0</td> | ||
| 543 | <td><a href="javascript:showClassDetail('c11',1)">Detail</a></td> | ||
| 544 | </tr> | ||
| 545 | |||
| 546 | <tr id='pt11.1' class='hiddenRow'> | ||
| 547 | <td class='none'><div class='testcase'>test_updateToCustomer_success</div></td> | ||
| 548 | <td colspan='5' align='center'>pass</td> | ||
| 549 | </tr> | ||
| 550 | |||
| 551 | <tr class='passClass'> | ||
| 552 | <td>eleccard_setUp.SetToSample</td> | ||
| 553 | <td>1</td> | ||
| 554 | <td>1</td> | ||
| 555 | <td>0</td> | ||
| 556 | <td>0</td> | ||
| 557 | <td><a href="javascript:showClassDetail('c12',1)">Detail</a></td> | ||
| 558 | </tr> | ||
| 559 | |||
| 560 | <tr id='pt12.1' class='hiddenRow'> | ||
| 561 | <td class='none'><div class='testcase'>test_updateToSample_success</div></td> | ||
| 562 | <td colspan='5' align='center'>pass</td> | ||
| 563 | </tr> | ||
| 564 | |||
| 565 | <tr class='failClass'> | ||
| 566 | <td>eleccard_setUp.SetUpElecCard</td> | ||
| 567 | <td>1</td> | ||
| 568 | <td>0</td> | ||
| 569 | <td>1</td> | ||
| 570 | <td>0</td> | ||
| 571 | <td><a href="javascript:showClassDetail('c13',1)">Detail</a></td> | ||
| 572 | </tr> | ||
| 573 | |||
| 574 | <tr id='ft13.1' class='none'> | ||
| 575 | <td class='failCase'><div class='testcase'>test_addElecCard_success</div></td> | ||
| 576 | <td colspan='5' align='center'> | ||
| 577 | |||
| 578 | <!--css div popup start--> | ||
| 579 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft13.1')" > | ||
| 580 | fail</a> | ||
| 581 | |||
| 582 | <div id='div_ft13.1' class="popup_window"> | ||
| 583 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 584 | <a onfocus='this.blur();' onclick="document.getElementById('div_ft13.1').style.display = 'none' " > | ||
| 585 | [x]</a> | ||
| 586 | </div> | ||
| 587 | <pre> | ||
| 588 | |||
| 589 | ft13.1: Traceback (most recent call last): | ||
| 590 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/eleccard_setUp.py", line 34, in test_addElecCard_success | ||
| 591 | self.assertEqual(self.result['status'], 1, 'addElecCard Error') | ||
| 592 | AssertionError: 2003 != 1 : addElecCard Error | ||
| 593 | Traceback (most recent call last): | ||
| 594 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/eleccard_setUp.py", line 34, in test_addElecCard_success | ||
| 595 | self.assertEqual(self.result['status'], 1, 'addElecCard Error') | ||
| 596 | AssertionError: 2003 != 1 : addElecCard Error | ||
| 597 | |||
| 598 | |||
| 599 | </pre> | ||
| 600 | </div> | ||
| 601 | <!--css div popup end--> | ||
| 602 | |||
| 603 | </td> | ||
| 604 | </tr> | ||
| 605 | |||
| 606 | <tr class='passClass'> | ||
| 607 | <td>eleccard_setUp.Unbind</td> | ||
| 608 | <td>1</td> | ||
| 609 | <td>1</td> | ||
| 610 | <td>0</td> | ||
| 611 | <td>0</td> | ||
| 612 | <td><a href="javascript:showClassDetail('c14',1)">Detail</a></td> | ||
| 613 | </tr> | ||
| 614 | |||
| 615 | <tr id='pt14.1' class='hiddenRow'> | ||
| 616 | <td class='none'><div class='testcase'>test_unbindCard_success</div></td> | ||
| 617 | <td colspan='5' align='center'>pass</td> | ||
| 618 | </tr> | ||
| 619 | |||
| 620 | <tr class='passClass'> | ||
| 621 | <td>parent_space.ParentSpaceChangePassword</td> | ||
| 622 | <td>1</td> | ||
| 623 | <td>1</td> | ||
| 624 | <td>0</td> | ||
| 625 | <td>0</td> | ||
| 626 | <td><a href="javascript:showClassDetail('c15',1)">Detail</a></td> | ||
| 627 | </tr> | ||
| 628 | |||
| 629 | <tr id='pt15.1' class='hiddenRow'> | ||
| 630 | <td class='none'><div class='testcase'>test_ParentSpaceChangePassword_success</div></td> | ||
| 631 | <td colspan='5' align='center'> | ||
| 632 | |||
| 633 | <!--css div popup start--> | ||
| 634 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt15.1')" > | ||
| 635 | pass</a> | ||
| 636 | |||
| 637 | <div id='div_pt15.1' class="popup_window"> | ||
| 638 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 639 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt15.1').style.display = 'none' " > | ||
| 640 | [x]</a> | ||
| 641 | </div> | ||
| 642 | <pre> | ||
| 643 | |||
| 644 | pt15.1: | ||
| 645 | |||
| 646 | </pre> | ||
| 647 | </div> | ||
| 648 | <!--css div popup end--> | ||
| 649 | |||
| 650 | </td> | ||
| 651 | </tr> | ||
| 652 | |||
| 653 | <tr class='passClass'> | ||
| 654 | <td>parent_space.ParentSpaceLogin</td> | ||
| 655 | <td>2</td> | ||
| 656 | <td>2</td> | ||
| 657 | <td>0</td> | ||
| 658 | <td>0</td> | ||
| 659 | <td><a href="javascript:showClassDetail('c16',2)">Detail</a></td> | ||
| 660 | </tr> | ||
| 661 | |||
| 662 | <tr id='pt16.1' class='hiddenRow'> | ||
| 663 | <td class='none'><div class='testcase'>test_ParentSpaceLogin_WrongPassword</div></td> | ||
| 664 | <td colspan='5' align='center'> | ||
| 665 | |||
| 666 | <!--css div popup start--> | ||
| 667 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt16.1')" > | ||
| 668 | pass</a> | ||
| 669 | |||
| 670 | <div id='div_pt16.1' class="popup_window"> | ||
| 671 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 672 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt16.1').style.display = 'none' " > | ||
| 673 | [x]</a> | ||
| 674 | </div> | ||
| 675 | <pre> | ||
| 676 | |||
| 677 | pt16.1: | ||
| 678 | |||
| 679 | </pre> | ||
| 680 | </div> | ||
| 681 | <!--css div popup end--> | ||
| 682 | |||
| 683 | </td> | ||
| 684 | </tr> | ||
| 685 | |||
| 686 | <tr id='pt16.2' class='hiddenRow'> | ||
| 687 | <td class='none'><div class='testcase'>test_ParentSpaceLogin_success</div></td> | ||
| 688 | <td colspan='5' align='center'> | ||
| 689 | |||
| 690 | <!--css div popup start--> | ||
| 691 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt16.2')" > | ||
| 692 | pass</a> | ||
| 693 | |||
| 694 | <div id='div_pt16.2' class="popup_window"> | ||
| 695 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 696 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt16.2').style.display = 'none' " > | ||
| 697 | [x]</a> | ||
| 698 | </div> | ||
| 699 | <pre> | ||
| 700 | |||
| 701 | pt16.2: | ||
| 702 | |||
| 703 | </pre> | ||
| 704 | </div> | ||
| 705 | <!--css div popup end--> | ||
| 706 | |||
| 707 | </td> | ||
| 708 | </tr> | ||
| 709 | |||
| 710 | <tr class='passClass'> | ||
| 711 | <td>parent_space.ParentSpaceNewPassword</td> | ||
| 712 | <td>2</td> | ||
| 713 | <td>2</td> | ||
| 714 | <td>0</td> | ||
| 715 | <td>0</td> | ||
| 716 | <td><a href="javascript:showClassDetail('c17',2)">Detail</a></td> | ||
| 717 | </tr> | ||
| 718 | |||
| 719 | <tr id='pt17.1' class='hiddenRow'> | ||
| 720 | <td class='none'><div class='testcase'>test_ParentSpaceNewPassword_authCodeError</div></td> | ||
| 721 | <td colspan='5' align='center'>pass</td> | ||
| 722 | </tr> | ||
| 723 | |||
| 724 | <tr id='pt17.2' class='hiddenRow'> | ||
| 725 | <td class='none'><div class='testcase'>test_ParentSpaceNewPassword_success</div></td> | ||
| 726 | <td colspan='5' align='center'>pass</td> | ||
| 727 | </tr> | ||
| 728 | |||
| 729 | <tr class='passClass'> | ||
| 730 | <td>personal_info.AddorUpdateSignature</td> | ||
| 731 | <td>4</td> | ||
| 732 | <td>4</td> | ||
| 733 | <td>0</td> | ||
| 734 | <td>0</td> | ||
| 735 | <td><a href="javascript:showClassDetail('c18',4)">Detail</a></td> | ||
| 736 | </tr> | ||
| 737 | |||
| 738 | <tr id='pt18.1' class='hiddenRow'> | ||
| 739 | <td class='none'><div class='testcase'>test_AddChildSignature_success</div></td> | ||
| 740 | <td colspan='5' align='center'> | ||
| 741 | |||
| 742 | <!--css div popup start--> | ||
| 743 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt18.1')" > | ||
| 744 | pass</a> | ||
| 745 | |||
| 746 | <div id='div_pt18.1' class="popup_window"> | ||
| 747 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 748 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt18.1').style.display = 'none' " > | ||
| 749 | [x]</a> | ||
| 750 | </div> | ||
| 751 | <pre> | ||
| 752 | |||
| 753 | pt18.1: | ||
| 754 | |||
| 755 | </pre> | ||
| 756 | </div> | ||
| 757 | <!--css div popup end--> | ||
| 758 | |||
| 759 | </td> | ||
| 760 | </tr> | ||
| 761 | |||
| 762 | <tr id='pt18.2' class='hiddenRow'> | ||
| 763 | <td class='none'><div class='testcase'>test_AddParentSignature_success</div></td> | ||
| 764 | <td colspan='5' align='center'>pass</td> | ||
| 765 | </tr> | ||
| 766 | |||
| 767 | <tr id='pt18.3' class='hiddenRow'> | ||
| 768 | <td class='none'><div class='testcase'>test_UpdateChildSignature_success</div></td> | ||
| 769 | <td colspan='5' align='center'>pass</td> | ||
| 770 | </tr> | ||
| 771 | |||
| 772 | <tr id='pt18.4' class='hiddenRow'> | ||
| 773 | <td class='none'><div class='testcase'>test_UpdateParentSignature_success</div></td> | ||
| 774 | <td colspan='5' align='center'>pass</td> | ||
| 775 | </tr> | ||
| 776 | |||
| 777 | <tr class='passClass'> | ||
| 778 | <td>personal_info.GetPersonalInfo</td> | ||
| 779 | <td>2</td> | ||
| 780 | <td>2</td> | ||
| 781 | <td>0</td> | ||
| 782 | <td>0</td> | ||
| 783 | <td><a href="javascript:showClassDetail('c19',2)">Detail</a></td> | ||
| 784 | </tr> | ||
| 785 | |||
| 786 | <tr id='pt19.1' class='hiddenRow'> | ||
| 787 | <td class='none'><div class='testcase'>test_getChildAccountInfo_success</div></td> | ||
| 788 | <td colspan='5' align='center'>pass</td> | ||
| 789 | </tr> | ||
| 790 | |||
| 791 | <tr id='pt19.2' class='hiddenRow'> | ||
| 792 | <td class='none'><div class='testcase'>test_getParentAccountInfo_success</div></td> | ||
| 793 | <td colspan='5' align='center'>pass</td> | ||
| 794 | </tr> | ||
| 795 | |||
| 796 | <tr class='passClass'> | ||
| 797 | <td>personal_info.GetSignature</td> | ||
| 798 | <td>2</td> | ||
| 799 | <td>2</td> | ||
| 800 | <td>0</td> | ||
| 801 | <td>0</td> | ||
| 802 | <td><a href="javascript:showClassDetail('c20',2)">Detail</a></td> | ||
| 803 | </tr> | ||
| 804 | |||
| 805 | <tr id='pt20.1' class='hiddenRow'> | ||
| 806 | <td class='none'><div class='testcase'>test_getChildSignature_success</div></td> | ||
| 807 | <td colspan='5' align='center'>pass</td> | ||
| 808 | </tr> | ||
| 809 | |||
| 810 | <tr id='pt20.2' class='hiddenRow'> | ||
| 811 | <td class='none'><div class='testcase'>test_getParentSignature_success</div></td> | ||
| 812 | <td colspan='5' align='center'>pass</td> | ||
| 813 | </tr> | ||
| 814 | |||
| 815 | <tr class='passClass'> | ||
| 816 | <td>personal_info.UpdatePersonalInfo</td> | ||
| 817 | <td>2</td> | ||
| 818 | <td>2</td> | ||
| 819 | <td>0</td> | ||
| 820 | <td>0</td> | ||
| 821 | <td><a href="javascript:showClassDetail('c21',2)">Detail</a></td> | ||
| 822 | </tr> | ||
| 823 | |||
| 824 | <tr id='pt21.1' class='hiddenRow'> | ||
| 825 | <td class='none'><div class='testcase'>test_UpdateChildInfo_success</div></td> | ||
| 826 | <td colspan='5' align='center'> | ||
| 827 | |||
| 828 | <!--css div popup start--> | ||
| 829 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt21.1')" > | ||
| 830 | pass</a> | ||
| 831 | |||
| 832 | <div id='div_pt21.1' class="popup_window"> | ||
| 833 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 834 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt21.1').style.display = 'none' " > | ||
| 835 | [x]</a> | ||
| 836 | </div> | ||
| 837 | <pre> | ||
| 838 | |||
| 839 | pt21.1: | ||
| 840 | |||
| 841 | </pre> | ||
| 842 | </div> | ||
| 843 | <!--css div popup end--> | ||
| 844 | |||
| 845 | </td> | ||
| 846 | </tr> | ||
| 847 | |||
| 848 | <tr id='pt21.2' class='hiddenRow'> | ||
| 849 | <td class='none'><div class='testcase'>test_UpdateParentInfo_success</div></td> | ||
| 850 | <td colspan='5' align='center'>pass</td> | ||
| 851 | </tr> | ||
| 852 | |||
| 853 | <tr class='passClass'> | ||
| 854 | <td>personal_info.UpdatePortrait</td> | ||
| 855 | <td>2</td> | ||
| 856 | <td>2</td> | ||
| 857 | <td>0</td> | ||
| 858 | <td>0</td> | ||
| 859 | <td><a href="javascript:showClassDetail('c22',2)">Detail</a></td> | ||
| 860 | </tr> | ||
| 861 | |||
| 862 | <tr id='pt22.1' class='hiddenRow'> | ||
| 863 | <td class='none'><div class='testcase'>test_UpdateChildPortrait_success</div></td> | ||
| 864 | <td colspan='5' align='center'> | ||
| 865 | |||
| 866 | <!--css div popup start--> | ||
| 867 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt22.1')" > | ||
| 868 | pass</a> | ||
| 869 | |||
| 870 | <div id='div_pt22.1' class="popup_window"> | ||
| 871 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 872 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt22.1').style.display = 'none' " > | ||
| 873 | [x]</a> | ||
| 874 | </div> | ||
| 875 | <pre> | ||
| 876 | |||
| 877 | pt22.1: | ||
| 878 | |||
| 879 | </pre> | ||
| 880 | </div> | ||
| 881 | <!--css div popup end--> | ||
| 882 | |||
| 883 | </td> | ||
| 884 | </tr> | ||
| 885 | |||
| 886 | <tr id='pt22.2' class='hiddenRow'> | ||
| 887 | <td class='none'><div class='testcase'>test_UpdateParentPortraitDefault_success</div></td> | ||
| 888 | <td colspan='5' align='center'>pass</td> | ||
| 889 | </tr> | ||
| 890 | |||
| 891 | <tr class='passClass'> | ||
| 892 | <td>personal_info.UpdatePortraitDefault</td> | ||
| 893 | <td>2</td> | ||
| 894 | <td>2</td> | ||
| 895 | <td>0</td> | ||
| 896 | <td>0</td> | ||
| 897 | <td><a href="javascript:showClassDetail('c23',2)">Detail</a></td> | ||
| 898 | </tr> | ||
| 899 | |||
| 900 | <tr id='pt23.1' class='hiddenRow'> | ||
| 901 | <td class='none'><div class='testcase'>test_UpdateChildPortraitDefault_success</div></td> | ||
| 902 | <td colspan='5' align='center'>pass</td> | ||
| 903 | </tr> | ||
| 904 | |||
| 905 | <tr id='pt23.2' class='hiddenRow'> | ||
| 906 | <td class='none'><div class='testcase'>test_UpdateParentPortraitDefault_success</div></td> | ||
| 907 | <td colspan='5' align='center'>pass</td> | ||
| 908 | </tr> | ||
| 909 | |||
| 910 | <tr class='passClass'> | ||
| 911 | <td>press.GetPressList</td> | ||
| 912 | <td>1</td> | ||
| 913 | <td>1</td> | ||
| 914 | <td>0</td> | ||
| 915 | <td>0</td> | ||
| 916 | <td><a href="javascript:showClassDetail('c24',1)">Detail</a></td> | ||
| 917 | </tr> | ||
| 918 | |||
| 919 | <tr id='pt24.1' class='hiddenRow'> | ||
| 920 | <td class='none'><div class='testcase'>test_getPressList_success</div></td> | ||
| 921 | <td colspan='5' align='center'> | ||
| 922 | |||
| 923 | <!--css div popup start--> | ||
| 924 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt24.1')" > | ||
| 925 | pass</a> | ||
| 926 | |||
| 927 | <div id='div_pt24.1' class="popup_window"> | ||
| 928 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 929 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt24.1').style.display = 'none' " > | ||
| 930 | [x]</a> | ||
| 931 | </div> | ||
| 932 | <pre> | ||
| 933 | |||
| 934 | pt24.1: | ||
| 935 | |||
| 936 | </pre> | ||
| 937 | </div> | ||
| 938 | <!--css div popup end--> | ||
| 939 | |||
| 940 | </td> | ||
| 941 | </tr> | ||
| 942 | |||
| 943 | <tr class='passClass'> | ||
| 944 | <td>press.GetUserPressInfo</td> | ||
| 945 | <td>1</td> | ||
| 946 | <td>1</td> | ||
| 947 | <td>0</td> | ||
| 948 | <td>0</td> | ||
| 949 | <td><a href="javascript:showClassDetail('c25',1)">Detail</a></td> | ||
| 950 | </tr> | ||
| 951 | |||
| 952 | <tr id='pt25.1' class='hiddenRow'> | ||
| 953 | <td class='none'><div class='testcase'>test_getPressList_success</div></td> | ||
| 954 | <td colspan='5' align='center'> | ||
| 955 | |||
| 956 | <!--css div popup start--> | ||
| 957 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt25.1')" > | ||
| 958 | pass</a> | ||
| 959 | |||
| 960 | <div id='div_pt25.1' class="popup_window"> | ||
| 961 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 962 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt25.1').style.display = 'none' " > | ||
| 963 | [x]</a> | ||
| 964 | </div> | ||
| 965 | <pre> | ||
| 966 | |||
| 967 | pt25.1: | ||
| 968 | |||
| 969 | </pre> | ||
| 970 | </div> | ||
| 971 | <!--css div popup end--> | ||
| 972 | |||
| 973 | </td> | ||
| 974 | </tr> | ||
| 975 | |||
| 976 | <tr class='errorClass'> | ||
| 977 | <td>press.UpdateUserPressInfo</td> | ||
| 978 | <td>1</td> | ||
| 979 | <td>0</td> | ||
| 980 | <td>0</td> | ||
| 981 | <td>1</td> | ||
| 982 | <td><a href="javascript:showClassDetail('c26',1)">Detail</a></td> | ||
| 983 | </tr> | ||
| 984 | |||
| 985 | <tr id='ft26.1' class='none'> | ||
| 986 | <td class='errorCase'><div class='testcase'>test_getPressList_success</div></td> | ||
| 987 | <td colspan='5' align='center'> | ||
| 988 | |||
| 989 | <!--css div popup start--> | ||
| 990 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft26.1')" > | ||
| 991 | error</a> | ||
| 992 | |||
| 993 | <div id='div_ft26.1' class="popup_window"> | ||
| 994 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 995 | <a onfocus='this.blur();' onclick="document.getElementById('div_ft26.1').style.display = 'none' " > | ||
| 996 | [x]</a> | ||
| 997 | </div> | ||
| 998 | <pre> | ||
| 999 | |||
| 1000 | ft26.1: Traceback (most recent call last): | ||
| 1001 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/press.py", line 88, in test_getPressList_success | ||
| 1002 | self.assertEqual(db_test.select_('acornuser.user_press', where), 1, 'UpdateUserPressInfo data Error') | ||
| 1003 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1004 | cursor.execute(sql) | ||
| 1005 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1006 | result = self._query(query) | ||
| 1007 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1008 | conn.query(q) | ||
| 1009 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 856, in query | ||
| 1010 | self._affected_rows = self._read_query_result(unbuffered=unbuffered) | ||
| 1011 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1057, in _read_query_result | ||
| 1012 | result.read() | ||
| 1013 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1340, in read | ||
| 1014 | first_packet = self.connection._read_packet() | ||
| 1015 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 987, in _read_packet | ||
| 1016 | packet_header = self._read_bytes(4) | ||
| 1017 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1033, in _read_bytes | ||
| 1018 | CR.CR_SERVER_LOST, "Lost connection to MySQL server during query") | ||
| 1019 | pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query') | ||
| 1020 | Traceback (most recent call last): | ||
| 1021 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/press.py", line 88, in test_getPressList_success | ||
| 1022 | self.assertEqual(db_test.select_('acornuser.user_press', where), 1, 'UpdateUserPressInfo data Error') | ||
| 1023 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1024 | cursor.execute(sql) | ||
| 1025 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1026 | result = self._query(query) | ||
| 1027 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1028 | conn.query(q) | ||
| 1029 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 856, in query | ||
| 1030 | self._affected_rows = self._read_query_result(unbuffered=unbuffered) | ||
| 1031 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1057, in _read_query_result | ||
| 1032 | result.read() | ||
| 1033 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1340, in read | ||
| 1034 | first_packet = self.connection._read_packet() | ||
| 1035 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 987, in _read_packet | ||
| 1036 | packet_header = self._read_bytes(4) | ||
| 1037 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1033, in _read_bytes | ||
| 1038 | CR.CR_SERVER_LOST, "Lost connection to MySQL server during query") | ||
| 1039 | pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query') | ||
| 1040 | |||
| 1041 | |||
| 1042 | </pre> | ||
| 1043 | </div> | ||
| 1044 | <!--css div popup end--> | ||
| 1045 | |||
| 1046 | </td> | ||
| 1047 | </tr> | ||
| 1048 | |||
| 1049 | <tr class='passClass'> | ||
| 1050 | <td>region_grade_school.GetCities</td> | ||
| 1051 | <td>1</td> | ||
| 1052 | <td>1</td> | ||
| 1053 | <td>0</td> | ||
| 1054 | <td>0</td> | ||
| 1055 | <td><a href="javascript:showClassDetail('c27',1)">Detail</a></td> | ||
| 1056 | </tr> | ||
| 1057 | |||
| 1058 | <tr id='pt27.1' class='hiddenRow'> | ||
| 1059 | <td class='none'><div class='testcase'>test_getCities_success</div></td> | ||
| 1060 | <td colspan='5' align='center'> | ||
| 1061 | |||
| 1062 | <!--css div popup start--> | ||
| 1063 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt27.1')" > | ||
| 1064 | pass</a> | ||
| 1065 | |||
| 1066 | <div id='div_pt27.1' class="popup_window"> | ||
| 1067 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1068 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt27.1').style.display = 'none' " > | ||
| 1069 | [x]</a> | ||
| 1070 | </div> | ||
| 1071 | <pre> | ||
| 1072 | |||
| 1073 | pt27.1: | ||
| 1074 | |||
| 1075 | </pre> | ||
| 1076 | </div> | ||
| 1077 | <!--css div popup end--> | ||
| 1078 | |||
| 1079 | </td> | ||
| 1080 | </tr> | ||
| 1081 | |||
| 1082 | <tr class='passClass'> | ||
| 1083 | <td>region_grade_school.GetCounties</td> | ||
| 1084 | <td>1</td> | ||
| 1085 | <td>1</td> | ||
| 1086 | <td>0</td> | ||
| 1087 | <td>0</td> | ||
| 1088 | <td><a href="javascript:showClassDetail('c28',1)">Detail</a></td> | ||
| 1089 | </tr> | ||
| 1090 | |||
| 1091 | <tr id='pt28.1' class='hiddenRow'> | ||
| 1092 | <td class='none'><div class='testcase'>test_getCounties_success</div></td> | ||
| 1093 | <td colspan='5' align='center'> | ||
| 1094 | |||
| 1095 | <!--css div popup start--> | ||
| 1096 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt28.1')" > | ||
| 1097 | pass</a> | ||
| 1098 | |||
| 1099 | <div id='div_pt28.1' class="popup_window"> | ||
| 1100 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1101 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt28.1').style.display = 'none' " > | ||
| 1102 | [x]</a> | ||
| 1103 | </div> | ||
| 1104 | <pre> | ||
| 1105 | |||
| 1106 | pt28.1: | ||
| 1107 | |||
| 1108 | </pre> | ||
| 1109 | </div> | ||
| 1110 | <!--css div popup end--> | ||
| 1111 | |||
| 1112 | </td> | ||
| 1113 | </tr> | ||
| 1114 | |||
| 1115 | <tr class='passClass'> | ||
| 1116 | <td>region_grade_school.GetGrades</td> | ||
| 1117 | <td>1</td> | ||
| 1118 | <td>1</td> | ||
| 1119 | <td>0</td> | ||
| 1120 | <td>0</td> | ||
| 1121 | <td><a href="javascript:showClassDetail('c29',1)">Detail</a></td> | ||
| 1122 | </tr> | ||
| 1123 | |||
| 1124 | <tr id='pt29.1' class='hiddenRow'> | ||
| 1125 | <td class='none'><div class='testcase'>test_getGrades_success</div></td> | ||
| 1126 | <td colspan='5' align='center'> | ||
| 1127 | |||
| 1128 | <!--css div popup start--> | ||
| 1129 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt29.1')" > | ||
| 1130 | pass</a> | ||
| 1131 | |||
| 1132 | <div id='div_pt29.1' class="popup_window"> | ||
| 1133 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1134 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt29.1').style.display = 'none' " > | ||
| 1135 | [x]</a> | ||
| 1136 | </div> | ||
| 1137 | <pre> | ||
| 1138 | |||
| 1139 | pt29.1: | ||
| 1140 | |||
| 1141 | </pre> | ||
| 1142 | </div> | ||
| 1143 | <!--css div popup end--> | ||
| 1144 | |||
| 1145 | </td> | ||
| 1146 | </tr> | ||
| 1147 | |||
| 1148 | <tr class='passClass'> | ||
| 1149 | <td>region_grade_school.GetProvince</td> | ||
| 1150 | <td>1</td> | ||
| 1151 | <td>1</td> | ||
| 1152 | <td>0</td> | ||
| 1153 | <td>0</td> | ||
| 1154 | <td><a href="javascript:showClassDetail('c30',1)">Detail</a></td> | ||
| 1155 | </tr> | ||
| 1156 | |||
| 1157 | <tr id='pt30.1' class='hiddenRow'> | ||
| 1158 | <td class='none'><div class='testcase'>test_getProvince_success</div></td> | ||
| 1159 | <td colspan='5' align='center'> | ||
| 1160 | |||
| 1161 | <!--css div popup start--> | ||
| 1162 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt30.1')" > | ||
| 1163 | pass</a> | ||
| 1164 | |||
| 1165 | <div id='div_pt30.1' class="popup_window"> | ||
| 1166 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1167 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt30.1').style.display = 'none' " > | ||
| 1168 | [x]</a> | ||
| 1169 | </div> | ||
| 1170 | <pre> | ||
| 1171 | |||
| 1172 | pt30.1: | ||
| 1173 | |||
| 1174 | </pre> | ||
| 1175 | </div> | ||
| 1176 | <!--css div popup end--> | ||
| 1177 | |||
| 1178 | </td> | ||
| 1179 | </tr> | ||
| 1180 | |||
| 1181 | <tr class='passClass'> | ||
| 1182 | <td>region_grade_school.GetSchools</td> | ||
| 1183 | <td>1</td> | ||
| 1184 | <td>1</td> | ||
| 1185 | <td>0</td> | ||
| 1186 | <td>0</td> | ||
| 1187 | <td><a href="javascript:showClassDetail('c31',1)">Detail</a></td> | ||
| 1188 | </tr> | ||
| 1189 | |||
| 1190 | <tr id='pt31.1' class='hiddenRow'> | ||
| 1191 | <td class='none'><div class='testcase'>test_getSchools_success</div></td> | ||
| 1192 | <td colspan='5' align='center'> | ||
| 1193 | |||
| 1194 | <!--css div popup start--> | ||
| 1195 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt31.1')" > | ||
| 1196 | pass</a> | ||
| 1197 | |||
| 1198 | <div id='div_pt31.1' class="popup_window"> | ||
| 1199 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1200 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt31.1').style.display = 'none' " > | ||
| 1201 | [x]</a> | ||
| 1202 | </div> | ||
| 1203 | <pre> | ||
| 1204 | |||
| 1205 | pt31.1: | ||
| 1206 | |||
| 1207 | </pre> | ||
| 1208 | </div> | ||
| 1209 | <!--css div popup end--> | ||
| 1210 | |||
| 1211 | </td> | ||
| 1212 | </tr> | ||
| 1213 | |||
| 1214 | <tr class='errorClass'> | ||
| 1215 | <td>register.AddFeedBack</td> | ||
| 1216 | <td>1</td> | ||
| 1217 | <td>0</td> | ||
| 1218 | <td>0</td> | ||
| 1219 | <td>1</td> | ||
| 1220 | <td><a href="javascript:showClassDetail('c32',1)">Detail</a></td> | ||
| 1221 | </tr> | ||
| 1222 | |||
| 1223 | <tr id='ft32.1' class='none'> | ||
| 1224 | <td class='errorCase'><div class='testcase'>test_AddFeedBack_success</div></td> | ||
| 1225 | <td colspan='5' align='center'> | ||
| 1226 | |||
| 1227 | <!--css div popup start--> | ||
| 1228 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft32.1')" > | ||
| 1229 | error</a> | ||
| 1230 | |||
| 1231 | <div id='div_ft32.1' class="popup_window"> | ||
| 1232 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1233 | <a onfocus='this.blur();' onclick="document.getElementById('div_ft32.1').style.display = 'none' " > | ||
| 1234 | [x]</a> | ||
| 1235 | </div> | ||
| 1236 | <pre> | ||
| 1237 | |||
| 1238 | ft32.1: Traceback (most recent call last): | ||
| 1239 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/register.py", line 213, in test_AddFeedBack_success | ||
| 1240 | self.assertTrue(db_test.select_('acornuser.feedback', select) > 0, 'AddFeedBack data insert Error') | ||
| 1241 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1242 | cursor.execute(sql) | ||
| 1243 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1244 | result = self._query(query) | ||
| 1245 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1246 | conn.query(q) | ||
| 1247 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 856, in query | ||
| 1248 | self._affected_rows = self._read_query_result(unbuffered=unbuffered) | ||
| 1249 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1057, in _read_query_result | ||
| 1250 | result.read() | ||
| 1251 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1340, in read | ||
| 1252 | first_packet = self.connection._read_packet() | ||
| 1253 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 987, in _read_packet | ||
| 1254 | packet_header = self._read_bytes(4) | ||
| 1255 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1033, in _read_bytes | ||
| 1256 | CR.CR_SERVER_LOST, "Lost connection to MySQL server during query") | ||
| 1257 | pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query') | ||
| 1258 | Traceback (most recent call last): | ||
| 1259 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/register.py", line 213, in test_AddFeedBack_success | ||
| 1260 | self.assertTrue(db_test.select_('acornuser.feedback', select) > 0, 'AddFeedBack data insert Error') | ||
| 1261 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1262 | cursor.execute(sql) | ||
| 1263 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1264 | result = self._query(query) | ||
| 1265 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1266 | conn.query(q) | ||
| 1267 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 856, in query | ||
| 1268 | self._affected_rows = self._read_query_result(unbuffered=unbuffered) | ||
| 1269 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1057, in _read_query_result | ||
| 1270 | result.read() | ||
| 1271 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1340, in read | ||
| 1272 | first_packet = self.connection._read_packet() | ||
| 1273 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 987, in _read_packet | ||
| 1274 | packet_header = self._read_bytes(4) | ||
| 1275 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1033, in _read_bytes | ||
| 1276 | CR.CR_SERVER_LOST, "Lost connection to MySQL server during query") | ||
| 1277 | pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query') | ||
| 1278 | |||
| 1279 | |||
| 1280 | </pre> | ||
| 1281 | </div> | ||
| 1282 | <!--css div popup end--> | ||
| 1283 | |||
| 1284 | </td> | ||
| 1285 | </tr> | ||
| 1286 | |||
| 1287 | <tr class='passClass'> | ||
| 1288 | <td>register.GetAuthCode</td> | ||
| 1289 | <td>1</td> | ||
| 1290 | <td>1</td> | ||
| 1291 | <td>0</td> | ||
| 1292 | <td>0</td> | ||
| 1293 | <td><a href="javascript:showClassDetail('c33',1)">Detail</a></td> | ||
| 1294 | </tr> | ||
| 1295 | |||
| 1296 | <tr id='pt33.1' class='hiddenRow'> | ||
| 1297 | <td class='none'><div class='testcase'>test_getAuthCode_success</div></td> | ||
| 1298 | <td colspan='5' align='center'> | ||
| 1299 | |||
| 1300 | <!--css div popup start--> | ||
| 1301 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt33.1')" > | ||
| 1302 | pass</a> | ||
| 1303 | |||
| 1304 | <div id='div_pt33.1' class="popup_window"> | ||
| 1305 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1306 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt33.1').style.display = 'none' " > | ||
| 1307 | [x]</a> | ||
| 1308 | </div> | ||
| 1309 | <pre> | ||
| 1310 | |||
| 1311 | pt33.1: | ||
| 1312 | |||
| 1313 | </pre> | ||
| 1314 | </div> | ||
| 1315 | <!--css div popup end--> | ||
| 1316 | |||
| 1317 | </td> | ||
| 1318 | </tr> | ||
| 1319 | |||
| 1320 | <tr class='passClass'> | ||
| 1321 | <td>register.GetRecentVideo</td> | ||
| 1322 | <td>2</td> | ||
| 1323 | <td>2</td> | ||
| 1324 | <td>0</td> | ||
| 1325 | <td>0</td> | ||
| 1326 | <td><a href="javascript:showClassDetail('c34',2)">Detail</a></td> | ||
| 1327 | </tr> | ||
| 1328 | |||
| 1329 | <tr id='pt34.1' class='hiddenRow'> | ||
| 1330 | <td class='none'><div class='testcase'>test_GetRecentVideo_noVideo_success</div></td> | ||
| 1331 | <td colspan='5' align='center'>pass</td> | ||
| 1332 | </tr> | ||
| 1333 | |||
| 1334 | <tr id='pt34.2' class='hiddenRow'> | ||
| 1335 | <td class='none'><div class='testcase'>test_GetRecentVideo_success</div></td> | ||
| 1336 | <td colspan='5' align='center'>pass</td> | ||
| 1337 | </tr> | ||
| 1338 | |||
| 1339 | <tr class='passClass'> | ||
| 1340 | <td>register.PhoneUsedCheck</td> | ||
| 1341 | <td>2</td> | ||
| 1342 | <td>2</td> | ||
| 1343 | <td>0</td> | ||
| 1344 | <td>0</td> | ||
| 1345 | <td><a href="javascript:showClassDetail('c35',2)">Detail</a></td> | ||
| 1346 | </tr> | ||
| 1347 | |||
| 1348 | <tr id='pt35.1' class='hiddenRow'> | ||
| 1349 | <td class='none'><div class='testcase'>test_phone_unused</div></td> | ||
| 1350 | <td colspan='5' align='center'> | ||
| 1351 | |||
| 1352 | <!--css div popup start--> | ||
| 1353 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt35.1')" > | ||
| 1354 | pass</a> | ||
| 1355 | |||
| 1356 | <div id='div_pt35.1' class="popup_window"> | ||
| 1357 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1358 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt35.1').style.display = 'none' " > | ||
| 1359 | [x]</a> | ||
| 1360 | </div> | ||
| 1361 | <pre> | ||
| 1362 | |||
| 1363 | pt35.1: | ||
| 1364 | |||
| 1365 | </pre> | ||
| 1366 | </div> | ||
| 1367 | <!--css div popup end--> | ||
| 1368 | |||
| 1369 | </td> | ||
| 1370 | </tr> | ||
| 1371 | |||
| 1372 | <tr id='pt35.2' class='hiddenRow'> | ||
| 1373 | <td class='none'><div class='testcase'>test_phone_used</div></td> | ||
| 1374 | <td colspan='5' align='center'> | ||
| 1375 | |||
| 1376 | <!--css div popup start--> | ||
| 1377 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt35.2')" > | ||
| 1378 | pass</a> | ||
| 1379 | |||
| 1380 | <div id='div_pt35.2' class="popup_window"> | ||
| 1381 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1382 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt35.2').style.display = 'none' " > | ||
| 1383 | [x]</a> | ||
| 1384 | </div> | ||
| 1385 | <pre> | ||
| 1386 | |||
| 1387 | pt35.2: | ||
| 1388 | |||
| 1389 | </pre> | ||
| 1390 | </div> | ||
| 1391 | <!--css div popup end--> | ||
| 1392 | |||
| 1393 | </td> | ||
| 1394 | </tr> | ||
| 1395 | |||
| 1396 | <tr class='passClass'> | ||
| 1397 | <td>register.RegisterExtrainfoCheck</td> | ||
| 1398 | <td>2</td> | ||
| 1399 | <td>2</td> | ||
| 1400 | <td>0</td> | ||
| 1401 | <td>0</td> | ||
| 1402 | <td><a href="javascript:showClassDetail('c36',2)">Detail</a></td> | ||
| 1403 | </tr> | ||
| 1404 | |||
| 1405 | <tr id='pt36.1' class='hiddenRow'> | ||
| 1406 | <td class='none'><div class='testcase'>test_checkRegisterExtrainfo_Complete_success</div></td> | ||
| 1407 | <td colspan='5' align='center'>pass</td> | ||
| 1408 | </tr> | ||
| 1409 | |||
| 1410 | <tr id='pt36.2' class='hiddenRow'> | ||
| 1411 | <td class='none'><div class='testcase'>test_checkRegisterExtrainfo_inComplete_success</div></td> | ||
| 1412 | <td colspan='5' align='center'>pass</td> | ||
| 1413 | </tr> | ||
| 1414 | |||
| 1415 | <tr class='errorClass'> | ||
| 1416 | <td>register.RegisterExtrainfoSubmit</td> | ||
| 1417 | <td>1</td> | ||
| 1418 | <td>0</td> | ||
| 1419 | <td>0</td> | ||
| 1420 | <td>1</td> | ||
| 1421 | <td><a href="javascript:showClassDetail('c37',1)">Detail</a></td> | ||
| 1422 | </tr> | ||
| 1423 | |||
| 1424 | <tr id='ft37.1' class='none'> | ||
| 1425 | <td class='errorCase'><div class='testcase'>test_RegisterExtrainfoSubmit_success</div></td> | ||
| 1426 | <td colspan='5' align='center'> | ||
| 1427 | |||
| 1428 | <!--css div popup start--> | ||
| 1429 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft37.1')" > | ||
| 1430 | error</a> | ||
| 1431 | |||
| 1432 | <div id='div_ft37.1' class="popup_window"> | ||
| 1433 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1434 | <a onfocus='this.blur();' onclick="document.getElementById('div_ft37.1').style.display = 'none' " > | ||
| 1435 | [x]</a> | ||
| 1436 | </div> | ||
| 1437 | <pre> | ||
| 1438 | |||
| 1439 | ft37.1: Traceback (most recent call last): | ||
| 1440 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/register.py", line 143, in test_RegisterExtrainfoSubmit_success | ||
| 1441 | self.assertEqual(db_test.select_('acornuser.acorn_user', where_1), 1, 'RegisterExtrainfoSubmit Error') | ||
| 1442 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1443 | cursor.execute(sql) | ||
| 1444 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1445 | result = self._query(query) | ||
| 1446 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1447 | conn.query(q) | ||
| 1448 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 855, in query | ||
| 1449 | self._execute_command(COMMAND.COM_QUERY, sql) | ||
| 1450 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1071, in _execute_command | ||
| 1451 | raise err.InterfaceError("(0, '')") | ||
| 1452 | pymysql.err.InterfaceError: (0, '') | ||
| 1453 | Traceback (most recent call last): | ||
| 1454 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/register.py", line 143, in test_RegisterExtrainfoSubmit_success | ||
| 1455 | self.assertEqual(db_test.select_('acornuser.acorn_user', where_1), 1, 'RegisterExtrainfoSubmit Error') | ||
| 1456 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1457 | cursor.execute(sql) | ||
| 1458 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1459 | result = self._query(query) | ||
| 1460 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1461 | conn.query(q) | ||
| 1462 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 855, in query | ||
| 1463 | self._execute_command(COMMAND.COM_QUERY, sql) | ||
| 1464 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1071, in _execute_command | ||
| 1465 | raise err.InterfaceError("(0, '')") | ||
| 1466 | pymysql.err.InterfaceError: (0, '') | ||
| 1467 | |||
| 1468 | |||
| 1469 | </pre> | ||
| 1470 | </div> | ||
| 1471 | <!--css div popup end--> | ||
| 1472 | |||
| 1473 | </td> | ||
| 1474 | </tr> | ||
| 1475 | |||
| 1476 | <tr class='passClass'> | ||
| 1477 | <td>register.SignIn</td> | ||
| 1478 | <td>1</td> | ||
| 1479 | <td>1</td> | ||
| 1480 | <td>0</td> | ||
| 1481 | <td>0</td> | ||
| 1482 | <td><a href="javascript:showClassDetail('c38',1)">Detail</a></td> | ||
| 1483 | </tr> | ||
| 1484 | |||
| 1485 | <tr id='pt38.1' class='hiddenRow'> | ||
| 1486 | <td class='none'><div class='testcase'>test_signIn_success</div></td> | ||
| 1487 | <td colspan='5' align='center'> | ||
| 1488 | |||
| 1489 | <!--css div popup start--> | ||
| 1490 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt38.1')" > | ||
| 1491 | pass</a> | ||
| 1492 | |||
| 1493 | <div id='div_pt38.1' class="popup_window"> | ||
| 1494 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1495 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt38.1').style.display = 'none' " > | ||
| 1496 | [x]</a> | ||
| 1497 | </div> | ||
| 1498 | <pre> | ||
| 1499 | |||
| 1500 | pt38.1: | ||
| 1501 | |||
| 1502 | </pre> | ||
| 1503 | </div> | ||
| 1504 | <!--css div popup end--> | ||
| 1505 | |||
| 1506 | </td> | ||
| 1507 | </tr> | ||
| 1508 | |||
| 1509 | <tr class='passClass'> | ||
| 1510 | <td>register.UpdateUserNameByUserId</td> | ||
| 1511 | <td>2</td> | ||
| 1512 | <td>2</td> | ||
| 1513 | <td>0</td> | ||
| 1514 | <td>0</td> | ||
| 1515 | <td><a href="javascript:showClassDetail('c39',2)">Detail</a></td> | ||
| 1516 | </tr> | ||
| 1517 | |||
| 1518 | <tr id='pt39.1' class='hiddenRow'> | ||
| 1519 | <td class='none'><div class='testcase'>test_UpdateUserNameByUserId_phoneExists_success</div></td> | ||
| 1520 | <td colspan='5' align='center'> | ||
| 1521 | |||
| 1522 | <!--css div popup start--> | ||
| 1523 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt39.1')" > | ||
| 1524 | pass</a> | ||
| 1525 | |||
| 1526 | <div id='div_pt39.1' class="popup_window"> | ||
| 1527 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1528 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt39.1').style.display = 'none' " > | ||
| 1529 | [x]</a> | ||
| 1530 | </div> | ||
| 1531 | <pre> | ||
| 1532 | |||
| 1533 | pt39.1: | ||
| 1534 | |||
| 1535 | </pre> | ||
| 1536 | </div> | ||
| 1537 | <!--css div popup end--> | ||
| 1538 | |||
| 1539 | </td> | ||
| 1540 | </tr> | ||
| 1541 | |||
| 1542 | <tr id='pt39.2' class='hiddenRow'> | ||
| 1543 | <td class='none'><div class='testcase'>test_UpdateUserNameByUserId_success</div></td> | ||
| 1544 | <td colspan='5' align='center'> | ||
| 1545 | |||
| 1546 | <!--css div popup start--> | ||
| 1547 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt39.2')" > | ||
| 1548 | pass</a> | ||
| 1549 | |||
| 1550 | <div id='div_pt39.2' class="popup_window"> | ||
| 1551 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1552 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt39.2').style.display = 'none' " > | ||
| 1553 | [x]</a> | ||
| 1554 | </div> | ||
| 1555 | <pre> | ||
| 1556 | |||
| 1557 | pt39.2: | ||
| 1558 | |||
| 1559 | </pre> | ||
| 1560 | </div> | ||
| 1561 | <!--css div popup end--> | ||
| 1562 | |||
| 1563 | </td> | ||
| 1564 | </tr> | ||
| 1565 | |||
| 1566 | <tr class='errorClass'> | ||
| 1567 | <td>sub_account.AddSubAccount</td> | ||
| 1568 | <td>1</td> | ||
| 1569 | <td>0</td> | ||
| 1570 | <td>0</td> | ||
| 1571 | <td>1</td> | ||
| 1572 | <td><a href="javascript:showClassDetail('c40',1)">Detail</a></td> | ||
| 1573 | </tr> | ||
| 1574 | |||
| 1575 | <tr id='ft40.1' class='none'> | ||
| 1576 | <td class='errorCase'><div class='testcase'>test_addSubAccount_success</div></td> | ||
| 1577 | <td colspan='5' align='center'> | ||
| 1578 | |||
| 1579 | <!--css div popup start--> | ||
| 1580 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft40.1')" > | ||
| 1581 | error</a> | ||
| 1582 | |||
| 1583 | <div id='div_ft40.1' class="popup_window"> | ||
| 1584 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1585 | <a onfocus='this.blur();' onclick="document.getElementById('div_ft40.1').style.display = 'none' " > | ||
| 1586 | [x]</a> | ||
| 1587 | </div> | ||
| 1588 | <pre> | ||
| 1589 | |||
| 1590 | ft40.1: Traceback (most recent call last): | ||
| 1591 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/sub_account.py", line 36, in test_addSubAccount_success | ||
| 1592 | self.assertEqual(db_test.select_('acornuser.child_user', {'parent_id': Data.PARENT_ID}), 1, 'addSubAccount Error') | ||
| 1593 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1594 | cursor.execute(sql) | ||
| 1595 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1596 | result = self._query(query) | ||
| 1597 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1598 | conn.query(q) | ||
| 1599 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 856, in query | ||
| 1600 | self._affected_rows = self._read_query_result(unbuffered=unbuffered) | ||
| 1601 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1057, in _read_query_result | ||
| 1602 | result.read() | ||
| 1603 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1340, in read | ||
| 1604 | first_packet = self.connection._read_packet() | ||
| 1605 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 987, in _read_packet | ||
| 1606 | packet_header = self._read_bytes(4) | ||
| 1607 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1033, in _read_bytes | ||
| 1608 | CR.CR_SERVER_LOST, "Lost connection to MySQL server during query") | ||
| 1609 | pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query') | ||
| 1610 | Traceback (most recent call last): | ||
| 1611 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/sub_account.py", line 36, in test_addSubAccount_success | ||
| 1612 | self.assertEqual(db_test.select_('acornuser.child_user', {'parent_id': Data.PARENT_ID}), 1, 'addSubAccount Error') | ||
| 1613 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1614 | cursor.execute(sql) | ||
| 1615 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1616 | result = self._query(query) | ||
| 1617 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1618 | conn.query(q) | ||
| 1619 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 856, in query | ||
| 1620 | self._affected_rows = self._read_query_result(unbuffered=unbuffered) | ||
| 1621 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1057, in _read_query_result | ||
| 1622 | result.read() | ||
| 1623 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1340, in read | ||
| 1624 | first_packet = self.connection._read_packet() | ||
| 1625 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 987, in _read_packet | ||
| 1626 | packet_header = self._read_bytes(4) | ||
| 1627 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1033, in _read_bytes | ||
| 1628 | CR.CR_SERVER_LOST, "Lost connection to MySQL server during query") | ||
| 1629 | pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query') | ||
| 1630 | |||
| 1631 | |||
| 1632 | </pre> | ||
| 1633 | </div> | ||
| 1634 | <!--css div popup end--> | ||
| 1635 | |||
| 1636 | </td> | ||
| 1637 | </tr> | ||
| 1638 | |||
| 1639 | <tr class='errorClass'> | ||
| 1640 | <td>sub_account.DelSubAccount</td> | ||
| 1641 | <td>1</td> | ||
| 1642 | <td>0</td> | ||
| 1643 | <td>0</td> | ||
| 1644 | <td>1</td> | ||
| 1645 | <td><a href="javascript:showClassDetail('c41',1)">Detail</a></td> | ||
| 1646 | </tr> | ||
| 1647 | |||
| 1648 | <tr id='ft41.1' class='none'> | ||
| 1649 | <td class='errorCase'><div class='testcase'>test_delSubAccount_success</div></td> | ||
| 1650 | <td colspan='5' align='center'> | ||
| 1651 | |||
| 1652 | <!--css div popup start--> | ||
| 1653 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft41.1')" > | ||
| 1654 | error</a> | ||
| 1655 | |||
| 1656 | <div id='div_ft41.1' class="popup_window"> | ||
| 1657 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1658 | <a onfocus='this.blur();' onclick="document.getElementById('div_ft41.1').style.display = 'none' " > | ||
| 1659 | [x]</a> | ||
| 1660 | </div> | ||
| 1661 | <pre> | ||
| 1662 | |||
| 1663 | ft41.1: Traceback (most recent call last): | ||
| 1664 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/sub_account.py", line 76, in test_delSubAccount_success | ||
| 1665 | self.assertEqual(db_test.select_('acornuser.child_user', {'subAccountId': self.subAccount}), 0, 'delSubAccount Error') | ||
| 1666 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1667 | cursor.execute(sql) | ||
| 1668 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1669 | result = self._query(query) | ||
| 1670 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1671 | conn.query(q) | ||
| 1672 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 855, in query | ||
| 1673 | self._execute_command(COMMAND.COM_QUERY, sql) | ||
| 1674 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1071, in _execute_command | ||
| 1675 | raise err.InterfaceError("(0, '')") | ||
| 1676 | pymysql.err.InterfaceError: (0, '') | ||
| 1677 | Traceback (most recent call last): | ||
| 1678 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/sub_account.py", line 76, in test_delSubAccount_success | ||
| 1679 | self.assertEqual(db_test.select_('acornuser.child_user', {'subAccountId': self.subAccount}), 0, 'delSubAccount Error') | ||
| 1680 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1681 | cursor.execute(sql) | ||
| 1682 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1683 | result = self._query(query) | ||
| 1684 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1685 | conn.query(q) | ||
| 1686 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 855, in query | ||
| 1687 | self._execute_command(COMMAND.COM_QUERY, sql) | ||
| 1688 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1071, in _execute_command | ||
| 1689 | raise err.InterfaceError("(0, '')") | ||
| 1690 | pymysql.err.InterfaceError: (0, '') | ||
| 1691 | |||
| 1692 | |||
| 1693 | </pre> | ||
| 1694 | </div> | ||
| 1695 | <!--css div popup end--> | ||
| 1696 | |||
| 1697 | </td> | ||
| 1698 | </tr> | ||
| 1699 | |||
| 1700 | <tr class='passClass'> | ||
| 1701 | <td>sub_account.GetSubAccount</td> | ||
| 1702 | <td>1</td> | ||
| 1703 | <td>1</td> | ||
| 1704 | <td>0</td> | ||
| 1705 | <td>0</td> | ||
| 1706 | <td><a href="javascript:showClassDetail('c42',1)">Detail</a></td> | ||
| 1707 | </tr> | ||
| 1708 | |||
| 1709 | <tr id='pt42.1' class='hiddenRow'> | ||
| 1710 | <td class='none'><div class='testcase'>test_getSubAccount_success</div></td> | ||
| 1711 | <td colspan='5' align='center'> | ||
| 1712 | |||
| 1713 | <!--css div popup start--> | ||
| 1714 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_pt42.1')" > | ||
| 1715 | pass</a> | ||
| 1716 | |||
| 1717 | <div id='div_pt42.1' class="popup_window"> | ||
| 1718 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1719 | <a onfocus='this.blur();' onclick="document.getElementById('div_pt42.1').style.display = 'none' " > | ||
| 1720 | [x]</a> | ||
| 1721 | </div> | ||
| 1722 | <pre> | ||
| 1723 | |||
| 1724 | pt42.1: | ||
| 1725 | |||
| 1726 | </pre> | ||
| 1727 | </div> | ||
| 1728 | <!--css div popup end--> | ||
| 1729 | |||
| 1730 | </td> | ||
| 1731 | </tr> | ||
| 1732 | |||
| 1733 | <tr class='errorClass'> | ||
| 1734 | <td>sub_account.SwitchAccounts</td> | ||
| 1735 | <td>2</td> | ||
| 1736 | <td>0</td> | ||
| 1737 | <td>0</td> | ||
| 1738 | <td>2</td> | ||
| 1739 | <td><a href="javascript:showClassDetail('c43',2)">Detail</a></td> | ||
| 1740 | </tr> | ||
| 1741 | |||
| 1742 | <tr id='ft43.1' class='none'> | ||
| 1743 | <td class='errorCase'><div class='testcase'>test_swichToParentAccount_success</div></td> | ||
| 1744 | <td colspan='5' align='center'> | ||
| 1745 | |||
| 1746 | <!--css div popup start--> | ||
| 1747 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft43.1')" > | ||
| 1748 | error</a> | ||
| 1749 | |||
| 1750 | <div id='div_ft43.1' class="popup_window"> | ||
| 1751 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1752 | <a onfocus='this.blur();' onclick="document.getElementById('div_ft43.1').style.display = 'none' " > | ||
| 1753 | [x]</a> | ||
| 1754 | </div> | ||
| 1755 | <pre> | ||
| 1756 | |||
| 1757 | ft43.1: Traceback (most recent call last): | ||
| 1758 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/sub_account.py", line 112, in test_swichToParentAccount_success | ||
| 1759 | self.assertEqual(db_test.select_('acornuser.acorn_user_status', where_data), 1, 'swichToParentAccount Error') | ||
| 1760 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1761 | cursor.execute(sql) | ||
| 1762 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1763 | result = self._query(query) | ||
| 1764 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1765 | conn.query(q) | ||
| 1766 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 855, in query | ||
| 1767 | self._execute_command(COMMAND.COM_QUERY, sql) | ||
| 1768 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1071, in _execute_command | ||
| 1769 | raise err.InterfaceError("(0, '')") | ||
| 1770 | pymysql.err.InterfaceError: (0, '') | ||
| 1771 | Traceback (most recent call last): | ||
| 1772 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/sub_account.py", line 112, in test_swichToParentAccount_success | ||
| 1773 | self.assertEqual(db_test.select_('acornuser.acorn_user_status', where_data), 1, 'swichToParentAccount Error') | ||
| 1774 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1775 | cursor.execute(sql) | ||
| 1776 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1777 | result = self._query(query) | ||
| 1778 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1779 | conn.query(q) | ||
| 1780 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 855, in query | ||
| 1781 | self._execute_command(COMMAND.COM_QUERY, sql) | ||
| 1782 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1071, in _execute_command | ||
| 1783 | raise err.InterfaceError("(0, '')") | ||
| 1784 | pymysql.err.InterfaceError: (0, '') | ||
| 1785 | |||
| 1786 | |||
| 1787 | </pre> | ||
| 1788 | </div> | ||
| 1789 | <!--css div popup end--> | ||
| 1790 | |||
| 1791 | </td> | ||
| 1792 | </tr> | ||
| 1793 | |||
| 1794 | <tr id='ft43.2' class='none'> | ||
| 1795 | <td class='errorCase'><div class='testcase'>test_swichToSubAccount_success</div></td> | ||
| 1796 | <td colspan='5' align='center'> | ||
| 1797 | |||
| 1798 | <!--css div popup start--> | ||
| 1799 | <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_ft43.2')" > | ||
| 1800 | error</a> | ||
| 1801 | |||
| 1802 | <div id='div_ft43.2' class="popup_window"> | ||
| 1803 | <div style='text-align: right; color:red;cursor:pointer'> | ||
| 1804 | <a onfocus='this.blur();' onclick="document.getElementById('div_ft43.2').style.display = 'none' " > | ||
| 1805 | [x]</a> | ||
| 1806 | </div> | ||
| 1807 | <pre> | ||
| 1808 | |||
| 1809 | ft43.2: Traceback (most recent call last): | ||
| 1810 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/sub_account.py", line 99, in test_swichToSubAccount_success | ||
| 1811 | self.assertEqual(db_test.select_('acornuser.child_user', where_data), 1, 'swichToSubAccount Error') | ||
| 1812 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1813 | cursor.execute(sql) | ||
| 1814 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1815 | result = self._query(query) | ||
| 1816 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1817 | conn.query(q) | ||
| 1818 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 855, in query | ||
| 1819 | self._execute_command(COMMAND.COM_QUERY, sql) | ||
| 1820 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1071, in _execute_command | ||
| 1821 | raise err.InterfaceError("(0, '')") | ||
| 1822 | pymysql.err.InterfaceError: (0, '') | ||
| 1823 | Traceback (most recent call last): | ||
| 1824 | File "/Users/shaozl/PycharmProjects/apiTest/test_cases/sub_account.py", line 99, in test_swichToSubAccount_success | ||
| 1825 | self.assertEqual(db_test.select_('acornuser.child_user', where_data), 1, 'swichToSubAccount Error') | ||
| 1826 | File "/Users/shaozl/PycharmProjects/apiTest/data_fixture/mysql_db.py", line 51, in select_ | ||
| 1827 | cursor.execute(sql) | ||
| 1828 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 166, in execute | ||
| 1829 | result = self._query(query) | ||
| 1830 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/cursors.py", line 322, in _query | ||
| 1831 | conn.query(q) | ||
| 1832 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 855, in query | ||
| 1833 | self._execute_command(COMMAND.COM_QUERY, sql) | ||
| 1834 | File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pymysql/connections.py", line 1071, in _execute_command | ||
| 1835 | raise err.InterfaceError("(0, '')") | ||
| 1836 | pymysql.err.InterfaceError: (0, '') | ||
| 1837 | |||
| 1838 | |||
| 1839 | </pre> | ||
| 1840 | </div> | ||
| 1841 | <!--css div popup end--> | ||
| 1842 | |||
| 1843 | </td> | ||
| 1844 | </tr> | ||
| 1845 | |||
| 1846 | <tr class='passClass'> | ||
| 1847 | <td>subject_sync.ClassNameVideo</td> | ||
| 1848 | <td>2</td> | ||
| 1849 | <td>2</td> | ||
| 1850 | <td>0</td> | ||
| 1851 | <td>0</td> | ||
| 1852 | <td><a href="javascript:showClassDetail('c44',2)">Detail</a></td> | ||
| 1853 | </tr> | ||
| 1854 | |||
| 1855 | <tr id='pt44.1' class='hiddenRow'> | ||
| 1856 | <td class='none'><div class='testcase'>test_ClassNameVideo_noData</div></td> | ||
| 1857 | <td colspan='5' align='center'>pass</td> | ||
| 1858 | </tr> | ||
| 1859 | |||
| 1860 | <tr id='pt44.2' class='hiddenRow'> | ||
| 1861 | <td class='none'><div class='testcase'>test_ClassNameVideo_success</div></td> | ||
| 1862 | <td colspan='5' align='center'>pass</td> | ||
| 1863 | </tr> | ||
| 1864 | |||
| 1865 | <tr class='passClass'> | ||
| 1866 | <td>subject_sync.ConsolidationExercise</td> | ||
| 1867 | <td>1</td> | ||
| 1868 | <td>1</td> | ||
| 1869 | <td>0</td> | ||
| 1870 | <td>0</td> | ||
| 1871 | <td><a href="javascript:showClassDetail('c45',1)">Detail</a></td> | ||
| 1872 | </tr> | ||
| 1873 | |||
| 1874 | <tr id='pt45.1' class='hiddenRow'> | ||
| 1875 | <td class='none'><div class='testcase'>test_ConsolidationExercise_success</div></td> | ||
| 1876 | <td colspan='5' align='center'>pass</td> | ||
| 1877 | </tr> | ||
| 1878 | |||
| 1879 | <tr class='passClass'> | ||
| 1880 | <td>subject_sync.PointVideo</td> | ||
| 1881 | <td>2</td> | ||
| 1882 | <td>2</td> | ||
| 1883 | <td>0</td> | ||
| 1884 | <td>0</td> | ||
| 1885 | <td><a href="javascript:showClassDetail('c46',2)">Detail</a></td> | ||
| 1886 | </tr> | ||
| 1887 | |||
| 1888 | <tr id='pt46.1' class='hiddenRow'> | ||
| 1889 | <td class='none'><div class='testcase'>test_PointVideo_noData</div></td> | ||
| 1890 | <td colspan='5' align='center'>pass</td> | ||
| 1891 | </tr> | ||
| 1892 | |||
| 1893 | <tr id='pt46.2' class='hiddenRow'> | ||
| 1894 | <td class='none'><div class='testcase'>test_PointVideo_success</div></td> | ||
| 1895 | <td colspan='5' align='center'>pass</td> | ||
| 1896 | </tr> | ||
| 1897 | |||
| 1898 | <tr class='passClass'> | ||
| 1899 | <td>subject_sync.SubjectTest</td> | ||
| 1900 | <td>1</td> | ||
| 1901 | <td>1</td> | ||
| 1902 | <td>0</td> | ||
| 1903 | <td>0</td> | ||
| 1904 | <td><a href="javascript:showClassDetail('c47',1)">Detail</a></td> | ||
| 1905 | </tr> | ||
| 1906 | |||
| 1907 | <tr id='pt47.1' class='hiddenRow'> | ||
| 1908 | <td class='none'><div class='testcase'>test_SubjectTest_success</div></td> | ||
| 1909 | <td colspan='5' align='center'>pass</td> | ||
| 1910 | </tr> | ||
| 1911 | |||
| 1912 | <tr id='total_row'> | ||
| 1913 | <td>Total</td> | ||
| 1914 | <td>72</td> | ||
| 1915 | <td>64</td> | ||
| 1916 | <td>1</td> | ||
| 1917 | <td>7</td> | ||
| 1918 | <td> </td> | ||
| 1919 | </tr> | ||
| 1920 | </table> | ||
| 1921 | |||
| 1922 | <div id='ending'> </div> | ||
| 1923 | |||
| 1924 | </body> | ||
| 1925 | </html> | ||
| 1926 |
report/test_report.html
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> | 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> | 4 | <head> |
| 5 | <title>Unit Test Report</title> | 5 | <title>Unit Test Report</title> |
| 6 | <meta name="generator" content="HTMLTestRunner 0.8.2"/> | 6 | <meta name="generator" content="HTMLTestRunner 0.8.2"/> |
| 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | 7 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 8 | 8 | ||
| 9 | <style type="text/css" media="screen"> | 9 | <style type="text/css" media="screen"> |
| 10 | body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; } | 10 | body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; } |
| 11 | table { font-size: 100%; } | 11 | table { font-size: 100%; } |
| 12 | pre { } | 12 | pre { } |
| 13 | 13 | ||
| 14 | /* -- heading ---------------------------------------------------------------------- */ | 14 | /* -- heading ---------------------------------------------------------------------- */ |
| 15 | h1 { | 15 | h1 { |
| 16 | font-size: 16pt; | 16 | font-size: 16pt; |
| 17 | color: gray; | 17 | color: gray; |
| 18 | } | 18 | } |
| 19 | .heading { | 19 | .heading { |
| 20 | margin-top: 0ex; | 20 | margin-top: 0ex; |
| 21 | margin-bottom: 1ex; | 21 | margin-bottom: 1ex; |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | .heading .attribute { | 24 | .heading .attribute { |
| 25 | margin-top: 1ex; | 25 | margin-top: 1ex; |
| 26 | margin-bottom: 0; | 26 | margin-bottom: 0; |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | .heading .description { | 29 | .heading .description { |
| 30 | margin-top: 4ex; | 30 | margin-top: 4ex; |
| 31 | margin-bottom: 6ex; | 31 | margin-bottom: 6ex; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | /* -- css div popup ------------------------------------------------------------------------ */ | 34 | /* -- css div popup ------------------------------------------------------------------------ */ |
| 35 | a.popup_link { | 35 | a.popup_link { |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | a.popup_link:hover { | 38 | a.popup_link:hover { |
| 39 | color: red; | 39 | color: red; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | .popup_window { | 42 | .popup_window { |
| 43 | display: none; | 43 | display: none; |
| 44 | position: relative; | 44 | position: relative; |
| 45 | left: 0px; | 45 | left: 0px; |
| 46 | top: 0px; | 46 | top: 0px; |
| 47 | /*border: solid #627173 1px; */ | 47 | /*border: solid #627173 1px; */ |
| 48 | padding: 10px; | 48 | padding: 10px; |
| 49 | background-color: #E6E6D6; | 49 | background-color: #E6E6D6; |
| 50 | font-family: "Lucida Console", "Courier New", Courier, monospace; | 50 | font-family: "Lucida Console", "Courier New", Courier, monospace; |
| 51 | text-align: left; | 51 | text-align: left; |
| 52 | font-size: 8pt; | 52 | font-size: 8pt; |
| 53 | width: 500px; | 53 | width: 500px; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | } | 56 | } |
| 57 | /* -- report ------------------------------------------------------------------------ */ | 57 | /* -- report ------------------------------------------------------------------------ */ |
| 58 | #show_detail_line { | 58 | #show_detail_line { |
| 59 | margin-top: 3ex; | 59 | margin-top: 3ex; |
| 60 | margin-bottom: 1ex; | 60 | margin-bottom: 1ex; |
| 61 | } | 61 | } |
| 62 | #result_table { | 62 | #result_table { |
| 63 | width: 80%; | 63 | width: 80%; |
| 64 | border-collapse: collapse; | 64 | border-collapse: collapse; |
| 65 | border: 1px solid #777; | 65 | border: 1px solid #777; |
| 66 | } | 66 | } |
| 67 | #header_row { | 67 | #header_row { |
| 68 | font-weight: bold; | 68 | font-weight: bold; |
| 69 | color: white; | 69 | color: white; |
| 70 | background-color: #777; | 70 | background-color: #777; |
| 71 | } | 71 | } |
| 72 | #result_table td { | 72 | #result_table td { |
| 73 | border: 1px solid #777; | 73 | border: 1px solid #777; |
| 74 | padding: 2px; | 74 | padding: 2px; |
| 75 | } | 75 | } |
| 76 | #total_row { font-weight: bold; } | 76 | #total_row { font-weight: bold; } |
| 77 | .passClass { background-color: #6c6; } | 77 | .passClass { background-color: #6c6; } |
| 78 | .failClass { background-color: #c60; } | 78 | .failClass { background-color: #c60; } |
| 79 | .errorClass { background-color: #c00; } | 79 | .errorClass { background-color: #c00; } |
| 80 | .passCase { color: #6c6; } | 80 | .passCase { color: #6c6; } |
| 81 | .failCase { color: #c60; font-weight: bold; } | 81 | .failCase { color: #c60; font-weight: bold; } |
| 82 | .errorCase { color: #c00; font-weight: bold; } | 82 | .errorCase { color: #c00; font-weight: bold; } |
| 83 | .hiddenRow { display: none; } | 83 | .hiddenRow { display: none; } |
| 84 | .testcase { margin-left: 2em; } | 84 | .testcase { margin-left: 2em; } |
| 85 | 85 | ||
| 86 | 86 | ||
| 87 | /* -- ending ---------------------------------------------------------------------- */ | 87 | /* -- ending ---------------------------------------------------------------------- */ |
| 88 | #ending { | 88 | #ending { |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | </style> | 91 | </style> |
| 92 | 92 | ||
| 93 | </head> | 93 | </head> |
| 94 | <body> | 94 | <body> |
| 95 | <script language="javascript" type="text/javascript"><!-- | 95 | <script language="javascript" type="text/javascript"><!-- |
| 96 | output_list = Array(); | 96 | output_list = Array(); |
| 97 | 97 | ||
| 98 | /* level - 0:Summary; 1:Failed; 2:All */ | 98 | /* level - 0:Summary; 1:Failed; 2:All */ |
| 99 | function showCase(level) { | 99 | function showCase(level) { |
| 100 | trs = document.getElementsByTagName("tr"); | 100 | trs = document.getElementsByTagName("tr"); |
| 101 | for (var i = 0; i < trs.length; i++) { | 101 | for (var i = 0; i < trs.length; i++) { |
| 102 | tr = trs[i]; | 102 | tr = trs[i]; |
| 103 | id = tr.id; | 103 | id = tr.id; |
| 104 | if (id.substr(0,2) == 'ft') { | 104 | if (id.substr(0,2) == 'ft') { |
| 105 | if (level < 1) { | 105 | if (level < 1) { |
| 106 | tr.className = 'hiddenRow'; | 106 | tr.className = 'hiddenRow'; |
| 107 | } | 107 | } |
| 108 | else { | 108 | else { |
| 109 | tr.className = ''; | 109 | tr.className = ''; |
| 110 | } | 110 | } |
| 111 | } | 111 | } |
| 112 | if (id.substr(0,2) == 'pt') { | 112 | if (id.substr(0,2) == 'pt') { |
| 113 | if (level > 1) { | 113 | if (level > 1) { |
| 114 | tr.className = ''; | 114 | tr.className = ''; |
| 115 | } | 115 | } |
| 116 | else { | 116 | else { |
| 117 | tr.className = 'hiddenRow'; | 117 | tr.className = 'hiddenRow'; |
| 118 | } | 118 | } |
| 119 | } | 119 | } |
| 120 | } | 120 | } |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | 123 | ||
| 124 | function showClassDetail(cid, count) { | 124 | function showClassDetail(cid, count) { |
| 125 | var id_list = Array(count); | 125 | var id_list = Array(count); |
| 126 | var toHide = 1; | 126 | var toHide = 1; |
| 127 | for (var i = 0; i < count; i++) { | 127 | for (var i = 0; i < count; i++) { |
| 128 | tid0 = 't' + cid.substr(1) + '.' + (i+1); | 128 | tid0 = 't' + cid.substr(1) + '.' + (i+1); |
| 129 | tid = 'f' + tid0; | 129 | tid = 'f' + tid0; |
| 130 | tr = document.getElementById(tid); | 130 | tr = document.getElementById(tid); |
| 131 | if (!tr) { | 131 | if (!tr) { |
| 132 | tid = 'p' + tid0; | 132 | tid = 'p' + tid0; |
| 133 | tr = document.getElementById(tid); | 133 | tr = document.getElementById(tid); |
| 134 | } | 134 | } |
| 135 | id_list[i] = tid; | 135 | id_list[i] = tid; |
| 136 | if (tr.className) { | 136 | if (tr.className) { |
| 137 | toHide = 0; | 137 | toHide = 0; |
| 138 | } | 138 | } |
| 139 | } | 139 | } |
| 140 | for (var i = 0; i < count; i++) { | 140 | for (var i = 0; i < count; i++) { |
| 141 | tid = id_list[i]; | 141 | tid = id_list[i]; |
| 142 | if (toHide) { | 142 | if (toHide) { |
| 143 | document.getElementById('div_'+tid).style.display = 'none' | 143 | document.getElementById('div_'+tid).style.display = 'none' |
| 144 | document.getElementById(tid).className = 'hiddenRow'; | 144 | document.getElementById(tid).className = 'hiddenRow'; |
| 145 | } | 145 | } |
| 146 | else { | 146 | else { |
| 147 | document.getElementById(tid).className = ''; | 147 | document.getElementById(tid).className = ''; |
| 148 | } | 148 | } |
| 149 | } | 149 | } |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | 152 | ||
| 153 | function showTestDetail(div_id){ | 153 | function showTestDetail(div_id){ |
| 154 | var details_div = document.getElementById(div_id) | 154 | var details_div = document.getElementById(div_id) |
| 155 | var displayState = details_div.style.display | 155 | var displayState = details_div.style.display |
| 156 | // alert(displayState) | 156 | // alert(displayState) |
| 157 | if (displayState != 'block' ) { | 157 | if (displayState != 'block' ) { |
| 158 | displayState = 'block' | 158 | displayState = 'block' |
| 159 | details_div.style.display = 'block' | 159 | details_div.style.display = 'block' |
| 160 | } | 160 | } |
| 161 | else { | 161 | else { |
| 162 | details_div.style.display = 'none' | 162 | details_div.style.display = 'none' |
| 163 | } | 163 | } |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | 166 | ||
| 167 | function html_escape(s) { | 167 | function html_escape(s) { |
| 168 | s = s.replace(/&/g,'&'); | 168 | s = s.replace(/&/g,'&'); |
| 169 | s = s.replace(/</g,'<'); | 169 | s = s.replace(/</g,'<'); |
| 170 | s = s.replace(/>/g,'>'); | 170 | s = s.replace(/>/g,'>'); |
| 171 | return s; | 171 | return s; |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | /* obsoleted by detail in <div> | 174 | /* obsoleted by detail in <div> |
| 175 | function showOutput(id, name) { | 175 | function showOutput(id, name) { |
| 176 | var w = window.open("", //url | 176 | var w = window.open("", //url |
| 177 | name, | 177 | name, |
| 178 | "resizable,scrollbars,status,width=800,height=450"); | 178 | "resizable,scrollbars,status,width=800,height=450"); |
| 179 | d = w.document; | 179 | d = w.document; |
| 180 | d.write("<pre>"); | 180 | d.write("<pre>"); |
| 181 | d.write(html_escape(output_list[id])); | 181 | d.write(html_escape(output_list[id])); |
| 182 | d.write("\n"); | 182 | d.write("\n"); |
| 183 | d.write("<a href='javascript:window.close()'>close</a>\n"); | 183 | d.write("<a href='javascript:window.close()'>close</a>\n"); |
| 184 | d.write("</pre>\n"); | 184 | d.write("</pre>\n"); |
| 185 | d.close(); | 185 | d.close(); |
| 186 | } | 186 | } |
| 187 | */ | 187 | */ |
| 188 | --></script> | 188 | --></script> |
| 189 | 189 | ||
| 190 | <div class='heading'> | 190 | <div class='heading'> |
| 191 | <h1>Unit Test Report</h1> | 191 | <h1>Unit Test Report</h1> |
| 192 | <p class='attribute'><strong>Start Time:</strong> 2018-01-12 15:33:19</p> | 192 | <p class='attribute'><strong>Start Time:</strong> 2018-01-15 17:44:45</p> |
| 193 | <p class='attribute'><strong>Duration:</strong> 0:00:09.093848</p> | 193 | <p class='attribute'><strong>Duration:</strong> 0:00:12.495048</p> |
| 194 | <p class='attribute'><strong>Status:</strong> Pass 1</p> | 194 | <p class='attribute'><strong>Status:</strong> Pass 1</p> |
| 195 | 195 | ||
| 196 | <p class='description'></p> | 196 | <p class='description'></p> |
| 197 | </div> | 197 | </div> |
| 198 | 198 | ||
| 199 | 199 | ||
| 200 | 200 | ||
| 201 | <p id='show_detail_line'>Show | 201 | <p id='show_detail_line'>Show |
| 202 | <a href='javascript:showCase(0)'>Summary</a> | 202 | <a href='javascript:showCase(0)'>Summary</a> |
| 203 | <a href='javascript:showCase(1)'>Failed</a> | 203 | <a href='javascript:showCase(1)'>Failed</a> |
| 204 | <a href='javascript:showCase(2)'>All</a> | 204 | <a href='javascript:showCase(2)'>All</a> |
| 205 | </p> | 205 | </p> |
| 206 | <table id='result_table'> | 206 | <table id='result_table'> |
| 207 | <colgroup> | 207 | <colgroup> |
| 208 | <col align='left' /> | 208 | <col align='left' /> |
| 209 | <col align='right' /> | 209 | <col align='right' /> |
| 210 | <col align='right' /> | 210 | <col align='right' /> |
| 211 | <col align='right' /> | 211 | <col align='right' /> |
| 212 | <col align='right' /> | 212 | <col align='right' /> |
| 213 | <col align='right' /> | 213 | <col align='right' /> |
| 214 | </colgroup> | 214 | </colgroup> |
| 215 | <tr id='header_row'> | 215 | <tr id='header_row'> |
| 216 | <td>Test Group/Test case</td> | 216 | <td>Test Group/Test case</td> |
| 217 | <td>Count</td> | 217 | <td>Count</td> |
| 218 | <td>Pass</td> | 218 | <td>Pass</td> |
| 219 | <td>Fail</td> | 219 | <td>Fail</td> |
| 220 | <td>Error</td> | 220 | <td>Error</td> |
| 221 | <td>View</td> | 221 | <td>View</td> |
| 222 | </tr> | 222 | </tr> |
| 223 | 223 | ||
| 224 | <tr class='passClass'> | 224 | <tr class='passClass'> |
| 225 | <td>test_cases.app_record_statistic.AppRecordEveryday</td> | 225 | <td>test_cases.app_record_statistic.AppRecordEveryday</td> |
| 226 | <td>1</td> | 226 | <td>1</td> |
| 227 | <td>1</td> | 227 | <td>1</td> |
| 228 | <td>0</td> | 228 | <td>0</td> |
| 229 | <td>0</td> | 229 | <td>0</td> |
| 230 | <td><a href="javascript:showClassDetail('c1',1)">Detail</a></td> | 230 | <td><a href="javascript:showClassDetail('c1',1)">Detail</a></td> |
| 231 | </tr> | 231 | </tr> |
| 232 | 232 | ||
| 233 | <tr id='pt1.1' class='hiddenRow'> | 233 | <tr id='pt1.1' class='hiddenRow'> |
| 234 | <td class='none'><div class='testcase'>test_getAppRecordEveryday_success</div></td> | 234 | <td class='none'><div class='testcase'>test_getAppRecordEveryday_success</div></td> |
| 235 | <td colspan='5' align='center'>pass</td> | 235 | <td colspan='5' align='center'>pass</td> |
| 236 | </tr> | 236 | </tr> |
| 237 | 237 | ||
| 238 | <tr id='total_row'> | 238 | <tr id='total_row'> |
| 239 | <td>Total</td> | 239 | <td>Total</td> |
| 240 | <td>1</td> | 240 | <td>1</td> |
| 241 | <td>1</td> | 241 | <td>1</td> |
| 242 | <td>0</td> | 242 | <td>0</td> |
| 243 | <td>0</td> | 243 | <td>0</td> |
| 244 | <td> </td> | 244 | <td> </td> |
| 245 | </tr> | 245 | </tr> |
| 246 | </table> | 246 | </table> |
| 247 | 247 | ||
| 248 | <div id='ending'> </div> | 248 | <div id='ending'> </div> |
| 249 | 249 | ||
| 250 | </body> | 250 | </body> |
| 251 | </html> | 251 | </html> |
| 252 | 252 |
run_test.py
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
| 3 | 3 | ||
| 4 | import unittest | 4 | import unittest |
| 5 | import HTMLTestRunner | 5 | import HTMLTestRunner |
| 6 | from test_cases import sub_account | 6 | from test_cases import sub_account |
| 7 | 7 | ||
| 8 | from test_suites import test_elecCard | 8 | from test_suites import test_elecCard |
| 9 | from test_cases import register | 9 | from test_cases import register |
| 10 | from test_cases import personal_info | 10 | from test_cases import personal_info |
| 11 | from test_cases import parent_space | 11 | from test_cases import parent_space |
| 12 | from test_cases import app_record_statistic | 12 | from test_cases import app_record_statistic |
| 13 | from test_cases import subject_sync | 13 | from test_cases import subject_sync |
| 14 | 14 | ||
| 15 | |||
| 15 | start_dir = './test_cases' | 16 | start_dir = './test_cases' |
| 16 | suite_run = unittest.TestSuite() | 17 | suite_run = unittest.TestSuite() |
| 17 | #suite_run = unittest.defaultTestLoader.discover(start_dir=start_dir, pattern='subject_sync.py') | 18 | suite_run = unittest.defaultTestLoader.discover(start_dir=start_dir, pattern='*.py') |
| 18 | 19 | ||
| 19 | 20 | ||
| 20 | suite_run.addTest(app_record_statistic.AppRecordEveryday('test_getAppRecordEveryday_success')) | 21 | #suite_run.addTest(app_record_statistic.AppRecordEveryday('test_getAppRecordEveryday_success')) |
| 21 | 22 | ||
| 22 | #suite_run.addTest(app_record_statistic.AppRecordReset('test_AppRecordReset_success')) | 23 | #suite_run.addTest(app_record_statistic.AppRecordReset('test_AppRecordReset_success')) |
| 23 | #suite_run.addTest(parent_space.ParentSpaceNewPassword('test_ParentSpaceNewPassword_success')) | 24 | #suite_run.addTest(parent_space.ParentSpaceChangePassword('test_ParentSpaceChangePassword_success')) |
| 24 | #suite_run.addTest(parent_space.ParentSpaceNewPassword('test_ParentSpaceNewPassword_authCodeError')) | 25 | #suite_run.addTest(parent_space.ParentSpaceNewPassword('test_ParentSpaceNewPassword_authCodeError')) |
| 25 | runner = HTMLTestRunner.HTMLTestRunner(outputdir='report') | 26 | runner = HTMLTestRunner.HTMLTestRunner(outputdir='report') |
| 26 | 27 | ||
| 27 | if __name__ == '__main__': | 28 | if __name__ == '__main__': |
| 28 | 29 | ||
| 29 | runner.run(suite_run) | 30 | runner.run(suite_run) |
| 30 | 31 | ||
| 31 | 32 | ||
| 32 | 33 |
test_cases/__pycache__/app_record_statistic.cpython-36.pyc
No preview for this file type
test_cases/__pycache__/parent_space.cpython-36.pyc
No preview for this file type
test_cases/__pycache__/personal_info.cpython-36.pyc
No preview for this file type
test_cases/__pycache__/press.cpython-36.pyc
No preview for this file type
test_cases/__pycache__/register.cpython-36.pyc
No preview for this file type
test_cases/__pycache__/sub_account.cpython-36.pyc
No preview for this file type
test_cases/__pycache__/subject_sync.cpython-36.pyc
No preview for this file type
test_cases/app_record_statistic.py
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
| 3 | 3 | ||
| 4 | import unittest | 4 | import unittest |
| 5 | import requests | 5 | import requests |
| 6 | from data_fixture.config_data import HOST_BOSS, HOST_STA | 6 | from data_fixture.config_data import HOST_BOSS, HOST_STA |
| 7 | from data_fixture import create_testdata as CreateTestData | 7 | from data_fixture import create_testdata as CreateTestData |
| 8 | from data_fixture import config_data as Data | 8 | from data_fixture import config_data as Data |
| 9 | from data_fixture.mysql_db import DB | 9 | from data_fixture.mysql_db import DB |
| 10 | import time | 10 | import time |
| 11 | from datetime import date | 11 | from datetime import date |
| 12 | 12 | ||
| 13 | db_test = DB() | ||
| 14 | 13 | ||
| 15 | 14 | ||
| 16 | #提交app使用记录 | 15 | #提交app使用记录 |
| 17 | class AppRecordSave(unittest.TestCase): | 16 | class AppRecordSave(unittest.TestCase): |
| 18 | def setUp(self): | 17 | def setUp(self): |
| 19 | self.base_url = HOST_STA + '/app/record/save' | 18 | self.base_url = HOST_STA + '/app/record/save' |
| 20 | 19 | ||
| 21 | def tearDown(self): | 20 | def tearDown(self): |
| 22 | print(self.result) | 21 | print(self.result) |
| 23 | 22 | ||
| 24 | def test_AppRecordSave_success(self): | 23 | def test_AppRecordSave_success(self): |
| 25 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 24 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 26 | postData = {'appName': '学科同步', | 25 | postData = {'appName': '学科同步', |
| 27 | 'appPid': 'com.hjx.synsubject', | 26 | 'appPid': 'com.hjx.synsubject', |
| 28 | 'timeSpent': 1088, | 27 | 'timeSpent': 1088, |
| 29 | 'userId': Data.USER_ID, | 28 | 'userId': Data.USER_ID, |
| 30 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND} | 29 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND} |
| 31 | send_time = str(time.time()).split('.')[0] | 30 | send_time = str(time.time()).split('.')[0] |
| 32 | r = requests.post(self.base_url, headers=headers, data=postData) | 31 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 33 | self.result = r.json() | 32 | self.result = r.json() |
| 34 | self.assertEqual(self.result['status'], 1, 'test_AppRecordSave_success Error') | 33 | self.assertEqual(self.result['status'], 1, 'test_AppRecordSave_success Error') |
| 35 | where = {'app_name': '学科同步', | 34 | where = {'app_name': '学科同步', |
| 36 | 'app_pid': 'com.hjx.synsubject', | 35 | 'app_pid': 'com.hjx.synsubject', |
| 37 | 'time_spent': 1088, | 36 | 'time_spent': 1088, |
| 38 | 'user_id': Data.USER_ID, | 37 | 'user_id': Data.USER_ID, |
| 39 | 'device_number': Data.DEVICE_NUMBER_CUS_BIND} | 38 | 'device_number': Data.DEVICE_NUMBER_CUS_BIND} |
| 40 | where_2 = " time_end >= {} ".format(send_time) | 39 | where_2 = " time_end >= {} ".format(send_time) |
| 41 | self.assertTrue(db_test.select_('analytics.app_record', where, where_2) >= 1, 'test_AppRecordSave_success data Error') | 40 | self.assertTrue(CreateTestData.db_select('analytics.app_record', where, where_2) >= 1, 'test_AppRecordSave_success data Error') |
| 42 | 41 | ||
| 43 | 42 | ||
| 44 | # 按时间段获取app使用统计 | 43 | # 按时间段获取app使用统计 |
| 45 | class AppRecordStats(unittest.TestCase): | 44 | class AppRecordStats(unittest.TestCase): |
| 46 | def setUp(self): | 45 | def setUp(self): |
| 47 | self.base_url = HOST_STA + '/app/record/stats' | 46 | self.base_url = HOST_STA + '/app/record/stats' |
| 48 | now = int(str(time.time()).split('.')[0]) | 47 | now = int(str(time.time()).split('.')[0]) |
| 49 | CreateTestData.create_app_use_record(now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) | 48 | CreateTestData.create_app_use_record(now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) |
| 50 | 49 | ||
| 51 | def tearDown(self): | 50 | def tearDown(self): |
| 52 | pass | 51 | pass |
| 53 | 52 | ||
| 54 | def test_getAppRecordStats_all_success(self): | 53 | def test_getAppRecordStats_all_success(self): |
| 55 | getData = {'userId': Data.USER_ID, | 54 | getData = {'userId': Data.USER_ID, |
| 56 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 55 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 57 | 'type': 'all'} | 56 | 'type': 'all'} |
| 58 | r = requests.get(self.base_url, params=getData) | 57 | r = requests.get(self.base_url, params=getData) |
| 59 | self.result_1 = r.json() | 58 | self.result_1 = r.json() |
| 60 | self.assertEqual(self.result_1['status'], 1, 'test_getAppRecordStats_all_success Error') | 59 | self.assertEqual(self.result_1['status'], 1, 'test_getAppRecordStats_all_success Error') |
| 61 | self.assertTrue(self.result_1['data']['gameTime'] > 0) | 60 | self.assertTrue(self.result_1['data']['gameTime'] > 0) |
| 62 | self.assertTrue(self.result_1['data']['studyTime'] > 0) | 61 | self.assertTrue(self.result_1['data']['studyTime'] > 0) |
| 63 | 62 | ||
| 64 | def test_getAppRecordStats_year_success(self): | 63 | def test_getAppRecordStats_year_success(self): |
| 65 | getData = {'userId': Data.USER_ID, | 64 | getData = {'userId': Data.USER_ID, |
| 66 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 65 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 67 | 'type': 'year'} | 66 | 'type': 'year'} |
| 68 | r = requests.get(self.base_url, params=getData) | 67 | r = requests.get(self.base_url, params=getData) |
| 69 | self.result_2 = r.json() | 68 | self.result_2 = r.json() |
| 70 | self.assertEqual(self.result_2['status'], 1, 'test_getAppRecordStats_year_success Error') | 69 | self.assertEqual(self.result_2['status'], 1, 'test_getAppRecordStats_year_success Error') |
| 71 | self.assertTrue(self.result_2['data']['gameTime'] > 0) | 70 | self.assertTrue(self.result_2['data']['gameTime'] > 0) |
| 72 | self.assertTrue(self.result_2['data']['studyTime'] > 0) | 71 | self.assertTrue(self.result_2['data']['studyTime'] > 0) |
| 73 | 72 | ||
| 74 | def test_getAppRecordStats_month_success(self): | 73 | def test_getAppRecordStats_month_success(self): |
| 75 | getData = {'userId': Data.USER_ID, | 74 | getData = {'userId': Data.USER_ID, |
| 76 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 75 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 77 | 'type': 'month'} | 76 | 'type': 'month'} |
| 78 | r = requests.get(self.base_url, params=getData) | 77 | r = requests.get(self.base_url, params=getData) |
| 79 | self.result_3 = r.json() | 78 | self.result_3 = r.json() |
| 80 | self.assertEqual(self.result_3['status'], 1, 'test_getAppRecordStats_month_success Error') | 79 | self.assertEqual(self.result_3['status'], 1, 'test_getAppRecordStats_month_success Error') |
| 81 | self.assertTrue(self.result_3['data']['gameTime'] > 0) | 80 | self.assertTrue(self.result_3['data']['gameTime'] > 0) |
| 82 | self.assertTrue(self.result_3['data']['studyTime'] > 0) | 81 | self.assertTrue(self.result_3['data']['studyTime'] > 0) |
| 83 | 82 | ||
| 84 | def test_getAppRecordStats_week_success(self): | 83 | def test_getAppRecordStats_week_success(self): |
| 85 | getData = {'userId': Data.USER_ID, | 84 | getData = {'userId': Data.USER_ID, |
| 86 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 85 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 87 | 'type': 'week'} | 86 | 'type': 'week'} |
| 88 | r = requests.get(self.base_url, params=getData) | 87 | r = requests.get(self.base_url, params=getData) |
| 89 | self.result_4 = r.json() | 88 | self.result_4 = r.json() |
| 90 | self.assertEqual(self.result_4['status'], 1, 'test_getAppRecordStats_week_success Error') | 89 | self.assertEqual(self.result_4['status'], 1, 'test_getAppRecordStats_week_success Error') |
| 91 | self.assertTrue(self.result_4['data']['gameTime'] > 0) | 90 | self.assertTrue(self.result_4['data']['gameTime'] > 0) |
| 92 | self.assertTrue(self.result_4['data']['studyTime'] > 0) | 91 | self.assertTrue(self.result_4['data']['studyTime'] > 0) |
| 93 | 92 | ||
| 94 | 93 | ||
| 95 | # 获取应用统计top排名 | 94 | # 获取应用统计top排名 |
| 96 | class AppRecordTop(unittest.TestCase): | 95 | class AppRecordTop(unittest.TestCase): |
| 97 | def setUp(self): | 96 | def setUp(self): |
| 98 | self.base_url = HOST_STA + '/app/record/top' | 97 | self.base_url = HOST_STA + '/app/record/top' |
| 99 | now = int(str(time.time()).split('.')[0]) | 98 | now = int(str(time.time()).split('.')[0]) |
| 100 | CreateTestData.create_app_use_record(now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) | 99 | CreateTestData.create_app_use_record(now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) |
| 101 | 100 | ||
| 102 | def tearDown(self): | 101 | def tearDown(self): |
| 103 | pass | 102 | pass |
| 104 | 103 | ||
| 105 | def test_getAppRecordTop_hjx(self): | 104 | def test_getAppRecordTop_hjx(self): |
| 106 | getData = {'userId': Data.USER_ID, | 105 | getData = {'userId': Data.USER_ID, |
| 107 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 106 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 108 | 'type': 'hjx'} | 107 | 'type': 'hjx'} |
| 109 | r = requests.get(self.base_url, params=getData) | 108 | r = requests.get(self.base_url, params=getData) |
| 110 | self.result_1 = r.json() | 109 | self.result_1 = r.json() |
| 111 | self.assertEqual(self.result_1['status'], 1, 'test_getAppRecordTop_hjx Error') | 110 | self.assertEqual(self.result_1['status'], 1, 'test_getAppRecordTop_hjx Error') |
| 112 | self.assertTrue(len(self.result_1['data']) > 0) | 111 | self.assertTrue(len(self.result_1['data']) > 0) |
| 113 | 112 | ||
| 114 | def test_getAppRecordTop_other(self): | 113 | def test_getAppRecordTop_other(self): |
| 115 | getData = {'userId': Data.USER_ID, | 114 | getData = {'userId': Data.USER_ID, |
| 116 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 115 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 117 | 'type': 'other'} | 116 | 'type': 'other'} |
| 118 | r = requests.get(self.base_url, params=getData) | 117 | r = requests.get(self.base_url, params=getData) |
| 119 | self.result_2 = r.json() | 118 | self.result_2 = r.json() |
| 120 | self.assertEqual(self.result_2['status'], 1, 'test_getAppRecordTop_other Error') | 119 | self.assertEqual(self.result_2['status'], 1, 'test_getAppRecordTop_other Error') |
| 121 | self.assertTrue(len(self.result_2['data']) > 0) | 120 | self.assertTrue(len(self.result_2['data']) > 0) |
| 122 | 121 | ||
| 123 | 122 | ||
| 124 | # 获取某一天的app统计 | 123 | # 获取某一天的app统计 |
| 125 | class AppRecordOneday(unittest.TestCase): | 124 | class AppRecordOneday(unittest.TestCase): |
| 126 | def setUp(self): | 125 | def setUp(self): |
| 127 | self.base_url = HOST_STA + '/app/record/oneday' | 126 | self.base_url = HOST_STA + '/app/record/oneday' |
| 128 | self.now = int(str(time.time()).split('.')[0]) | 127 | self.now = int(str(time.time()).split('.')[0]) |
| 129 | CreateTestData.create_app_use_record(self.now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) | 128 | CreateTestData.create_app_use_record(self.now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) |
| 130 | 129 | ||
| 131 | def tearDown(self): | 130 | def tearDown(self): |
| 132 | pass | 131 | pass |
| 133 | 132 | ||
| 134 | def test_getAppRecordOneday_success(self): | 133 | def test_getAppRecordOneday_success(self): |
| 135 | getData = {'userId': Data.USER_ID, | 134 | getData = {'userId': Data.USER_ID, |
| 136 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 135 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 137 | 'dayTimestamp': str(time.mktime(date.today().timetuple())).split('.')[0]} | 136 | 'dayTimestamp': str(time.mktime(date.today().timetuple())).split('.')[0]} |
| 138 | pageNum = 1 | 137 | pageNum = 1 |
| 139 | appRecord = [] | 138 | appRecord = [] |
| 140 | while True: | 139 | while True: |
| 141 | getData.update({'pageNum':pageNum}) | 140 | getData.update({'pageNum':pageNum}) |
| 142 | r = requests.get(self.base_url, params=getData) | 141 | r = requests.get(self.base_url, params=getData) |
| 143 | self.result = r.json() | 142 | self.result = r.json() |
| 144 | appRecord = appRecord + self.result['data'] | 143 | appRecord = appRecord + self.result['data'] |
| 145 | if len(self.result['data']) == 0: | 144 | if len(self.result['data']) == 0: |
| 146 | break | 145 | break |
| 147 | pageNum += 1 | 146 | pageNum += 1 |
| 148 | 147 | ||
| 149 | self.result_1 = r.json() | 148 | self.result_1 = r.json() |
| 150 | self.assertTrue(len(appRecord) == 24) | 149 | self.assertTrue(len(appRecord) == 24) |
| 151 | 150 | ||
| 152 | app_name = appRecord[0]['appName'] | 151 | app_name = appRecord[0]['appName'] |
| 153 | time_spent = appRecord[0]['timeSpentTotal'] | 152 | time_spent = appRecord[0]['timeSpentTotal'] |
| 154 | time_end = appRecord[0]['latestTimeEnd'] | 153 | time_end = appRecord[0]['latestTimeEnd'] |
| 155 | source_id = appRecord[0]['sourceId'] | 154 | source_id = appRecord[0]['sourceId'] |
| 156 | category_id = appRecord[0]['categoryId'] | 155 | category_id = appRecord[0]['categoryId'] |
| 157 | categoryType = appRecord[0]['categoryType'] | 156 | categoryType = appRecord[0]['categoryType'] |
| 158 | study_category = [25,26,27,28,57] | 157 | study_category = [25,26,27,28,57] |
| 159 | game_category = [37,38,39,100] | 158 | game_category = [37,38,39,100] |
| 160 | 159 | ||
| 161 | where_1 = {'app_name':app_name, | 160 | where_1 = {'app_name':app_name, |
| 162 | 'time_spent':time_spent, | 161 | 'time_spent':time_spent, |
| 163 | 'time_end': time_end, | 162 | 'time_end': time_end, |
| 164 | 'source_id':source_id, | 163 | 'source_id':source_id, |
| 165 | 'category_id':category_id, | 164 | 'category_id':category_id, |
| 166 | 'user_id': Data.USER_ID, | 165 | 'user_id': Data.USER_ID, |
| 167 | 'device_number': Data.DEVICE_NUMBER_CUS_BIND | 166 | 'device_number': Data.DEVICE_NUMBER_CUS_BIND |
| 168 | } | 167 | } |
| 169 | self.assertEqual(db_test.select_('analytics.app_record', where_1) , 1) | 168 | self.assertEqual(CreateTestData.db_select('analytics.app_record', where_1) , 1) |
| 170 | if category_id in study_category: | 169 | if category_id in study_category: |
| 171 | self.assertEqual(categoryType, 1) | 170 | self.assertEqual(categoryType, 1) |
| 172 | if category_id in game_category: | 171 | if category_id in game_category: |
| 173 | self.assertEqual(categoryType, 2) | 172 | self.assertEqual(categoryType, 2) |
| 174 | 173 | ||
| 175 | 174 | ||
| 176 | # 获取几天的app统计 | 175 | # 获取几天的app统计 |
| 177 | class AppRecordEveryday(unittest.TestCase): | 176 | class AppRecordEveryday(unittest.TestCase): |
| 178 | def setUp(self): | 177 | def setUp(self): |
| 179 | self.base_url = HOST_STA + '/app/record/everyday' | 178 | self.base_url = HOST_STA + '/app/record/everyday' |
| 180 | self.now = int(str(time.time()).split('.')[0]) | 179 | self.now = int(str(time.time()).split('.')[0]) |
| 181 | # CreateTestData.create_app_use_record(self.now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) | 180 | # CreateTestData.create_app_use_record(self.now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) |
| 182 | CreateTestData.create_app_use_record(self.now, '7000000054686780', '123456789002') | 181 | CreateTestData.create_app_use_record(self.now, '7000000054686780', '123456789002') |
| 183 | 182 | ||
| 184 | 183 | ||
| 185 | def tearDown(self): | 184 | def tearDown(self): |
| 186 | pass | 185 | pass |
| 187 | 186 | ||
| 188 | def test_getAppRecordEveryday_success(self): | 187 | def test_getAppRecordEveryday_success(self): |
| 189 | # getData = {'userId': Data.USER_ID, | 188 | # getData = {'userId': Data.USER_ID, |
| 190 | # 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 189 | # 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 191 | # 'pageNum': 1, | 190 | # 'pageNum': 1, |
| 192 | # 'pageSize': 7} | 191 | # 'pageSize': 7} |
| 193 | getData = {'userId': '7000000054686780', | 192 | getData = {'userId': '7000000054686780', |
| 194 | 'deviceNumber': '123456789002', | 193 | 'deviceNumber': '123456789002', |
| 195 | 'pageNum': 1, | 194 | 'pageNum': 1, |
| 196 | 'pageSize': 7} | 195 | 'pageSize': 7} |
| 197 | r = requests.get(self.base_url, params=getData) | 196 | r = requests.get(self.base_url, params=getData) |
| 198 | self.result = r.json() | 197 | self.result = r.json() |
| 199 | self.assertEqual(self.result['status'], 1, 'test_getAppRecordEveryday_success Error') | 198 | self.assertEqual(self.result['status'], 1, 'test_getAppRecordEveryday_success Error') |
| 200 | self.assertEqual(self.result['data'][0]['gameTimeSpent'], 2550) | 199 | self.assertEqual(self.result['data'][0]['gameTimeSpent'], 2550) |
| 201 | self.assertEqual(self.result['data'][0]['studyTimeSpent'], 3150) | 200 | self.assertEqual(self.result['data'][0]['studyTimeSpent'], 3150) |
| 202 | 201 | ||
| 203 | 202 | ||
| 204 | # 获取当天的app统计 | 203 | # 获取当天的app统计 |
| 205 | class AppRecordToday(unittest.TestCase): | 204 | class AppRecordToday(unittest.TestCase): |
| 206 | def setUp(self): | 205 | def setUp(self): |
| 207 | self.base_url = HOST_STA + '/app/record/today' | 206 | self.base_url = HOST_STA + '/app/record/today' |
| 208 | self.now = int(str(time.time()).split('.')[0]) | 207 | self.now = int(str(time.time()).split('.')[0]) |
| 209 | CreateTestData.create_app_use_record(self.now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) | 208 | CreateTestData.create_app_use_record(self.now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) |
| 210 | 209 | ||
| 211 | def tearDown(self): | 210 | def tearDown(self): |
| 212 | pass | 211 | pass |
| 213 | 212 | ||
| 214 | def test_AppRecordToday_success(self): | 213 | def test_AppRecordToday_success(self): |
| 215 | getData = {'userId': Data.USER_ID, | 214 | getData = {'userId': Data.USER_ID, |
| 216 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND} | 215 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND} |
| 217 | r = requests.get(self.base_url, params=getData) | 216 | r = requests.get(self.base_url, params=getData) |
| 218 | self.result = r.json() | 217 | self.result = r.json() |
| 219 | self.assertEqual(self.result['status'], 1, 'AppRecordToday Error') | 218 | self.assertEqual(self.result['status'], 1, 'AppRecordToday Error') |
| 220 | self.assertEqual(self.result['data']['gameTimeSpent'], 2550) | 219 | self.assertEqual(self.result['data']['gameTimeSpent'], 2550) |
| 221 | self.assertEqual(self.result['data']['studyTimeSpent'], 3150) | 220 | self.assertEqual(self.result['data']['studyTimeSpent'], 3150) |
| 222 | 221 | ||
| 223 | 222 | ||
| 224 | #重置数据接口 | 223 | #重置数据接口 |
| 225 | class AppRecordReset(unittest.TestCase): | 224 | class AppRecordReset(unittest.TestCase): |
| 226 | def setUp(self): | 225 | def setUp(self): |
| 227 | self.base_url = HOST_STA + '/app/record/reset' | 226 | self.base_url = HOST_STA + '/app/record/reset' |
| 228 | # create elec card , to get mobile phpne | 227 | # create elec card , to get mobile phpne |
| 229 | self.password = CreateTestData.get_parentSpace_password(Data.DEVICE_NUMBER_CUS_BIND) | 228 | self.password = CreateTestData.get_parentSpace_password(Data.DEVICE_NUMBER_CUS_BIND) |
| 230 | now = int(str(time.time()).split('.')[0]) | 229 | now = int(str(time.time()).split('.')[0]) |
| 231 | CreateTestData.create_app_use_record(now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) | 230 | CreateTestData.create_app_use_record(now, Data.USER_ID, Data.DEVICE_NUMBER_CUS_BIND) |
| 232 | 231 | ||
| 233 | def tearDown(self): | 232 | def tearDown(self): |
| 234 | pass | 233 | pass |
| 235 | 234 | ||
| 236 | def test_AppRecordReset_success(self): | 235 | def test_AppRecordReset_success(self): |
| 237 | getData = {'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 236 | getData = {'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 238 | 'password': self.password, | 237 | 'password': self.password, |
| 239 | 'userId': Data.USER_ID | 238 | 'userId': Data.USER_ID |
| 240 | } | 239 | } |
| 241 | r = requests.post(self.base_url, data=getData) | 240 | r = requests.post(self.base_url, data=getData) |
| 242 | self.result = r.json() | 241 | self.result = r.json() |
| 243 | self.assertEqual(self.result['status'], 1, 'test_AppRecordReset_success Error') | 242 | self.assertEqual(self.result['status'], 1, 'test_AppRecordReset_success Error') |
| 244 | where = {'device_number': Data.DEVICE_NUMBER_CUS_BIND, | 243 | where = {'device_number': Data.DEVICE_NUMBER_CUS_BIND, |
| 245 | 'user_id': Data.USER_ID | 244 | 'user_id': Data.USER_ID |
| 246 | } | 245 | } |
| 247 | self.assertEqual(db_test.select_('analytics.app_record', where), 0) | 246 | self.assertEqual(CreateTestData.db_select('analytics.app_record', where), 0) |
| 248 | 247 | ||
| 249 | def test_AppRecordReset_passwordError(self): | 248 | def test_AppRecordReset_passwordError(self): |
| 250 | getData = {'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 249 | getData = {'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 251 | 'userId': Data.USER_ID, | 250 | 'userId': Data.USER_ID, |
| 252 | 'password': self.password + '111' | 251 | 'password': self.password + '111' |
| 253 | } | 252 | } |
| 254 | r = requests.post(self.base_url, data=getData) | 253 | r = requests.post(self.base_url, data=getData) |
| 255 | self.result_2 = r.json() | 254 | self.result_2 = r.json() |
| 256 | self.assertEqual(self.result_2['status'], 1005, 'test_AppRecordReset_passwordError Error') | 255 | self.assertEqual(self.result_2['status'], 1005, 'test_AppRecordReset_passwordError Error') |
| 257 | 256 | ||
| 258 | 257 | ||
| 259 | 258 | ||
| 260 | 259 |
test_cases/parent_space.py
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
| 3 | 3 | ||
| 4 | import unittest | 4 | import unittest |
| 5 | import requests | 5 | import requests |
| 6 | from data_fixture.config_data import HOST_BOSS, HOST_STA | 6 | from data_fixture.config_data import HOST_BOSS, HOST_STA |
| 7 | from data_fixture import create_testdata as CreateTestData | 7 | from data_fixture import create_testdata as CreateTestData |
| 8 | from data_fixture import config_data as Data | 8 | from data_fixture import config_data as Data |
| 9 | from data_fixture.mysql_db import DB | 9 | from data_fixture.mysql_db import DB |
| 10 | import uuid | 10 | import uuid |
| 11 | import time | 11 | import time |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | db_test = DB() | ||
| 15 | 14 | ||
| 16 | # 家长控制登录 | 15 | # 家长控制登录 |
| 17 | class ParentSpaceLogin(unittest.TestCase): | 16 | class ParentSpaceLogin(unittest.TestCase): |
| 18 | def setUp(self): | 17 | def setUp(self): |
| 19 | self.base_url = HOST_BOSS + '/parentsSpacePass/login' | 18 | self.base_url = HOST_BOSS + '/parentsSpacePass/login' |
| 20 | self.password = CreateTestData.get_parentSpace_password(Data.DEVICE_NUMBER_CUS_BIND) | 19 | self.password = CreateTestData.get_parentSpace_password(Data.DEVICE_NUMBER_CUS_BIND) |
| 21 | 20 | ||
| 22 | def tearDown(self): | 21 | def tearDown(self): |
| 23 | print(self.result) | 22 | print(self.result) |
| 24 | 23 | ||
| 25 | def test_ParentSpaceLogin_success(self): | 24 | def test_ParentSpaceLogin_success(self): |
| 26 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 25 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 27 | postData = {'password': self.password, | 26 | postData = {'password': self.password, |
| 28 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND | 27 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND |
| 29 | } | 28 | } |
| 30 | r = requests.post(self.base_url, headers=headers, data=postData) | 29 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 31 | self.result = r.json() | 30 | self.result = r.json() |
| 32 | self.assertEqual(self.result['status'], 1, 'ParentSpaceLogin Error') | 31 | self.assertEqual(self.result['status'], 1, 'ParentSpaceLogin Error') |
| 33 | 32 | ||
| 34 | def test_ParentSpaceLogin_WrongPassword(self): | 33 | def test_ParentSpaceLogin_WrongPassword(self): |
| 35 | password_wrong = self.password + '11' | 34 | password_wrong = self.password + '11' |
| 36 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 35 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 37 | postData = {'password': password_wrong, | 36 | postData = {'password': password_wrong, |
| 38 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND | 37 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND |
| 39 | } | 38 | } |
| 40 | r = requests.post(self.base_url, headers=headers, data=postData) | 39 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 41 | self.result = r.json() | 40 | self.result = r.json() |
| 42 | self.assertEqual(self.result['status'], 1005, 'test_ParentSpaceLogin_WrongPassword Error') | 41 | self.assertEqual(self.result['status'], 1005, 'test_ParentSpaceLogin_WrongPassword Error') |
| 43 | 42 | ||
| 44 | 43 | ||
| 45 | # 家长控制修改密码 | 44 | # 家长控制修改密码 |
| 46 | class ParentSpaceChangePassword(unittest.TestCase): | 45 | class ParentSpaceChangePassword(unittest.TestCase): |
| 47 | def setUp(self): | 46 | def setUp(self): |
| 48 | self.base_url = HOST_BOSS + '/parentsSpacePass/changePassword' | 47 | self.base_url = HOST_BOSS + '/parentsSpacePass/changePassword' |
| 49 | self.oldPass = CreateTestData.get_parentSpace_password(Data.DEVICE_NUMBER_CUS_BIND) | 48 | self.oldPass = CreateTestData.get_parentSpace_password(Data.DEVICE_NUMBER_CUS_BIND) |
| 50 | 49 | ||
| 51 | def tearDown(self): | 50 | def tearDown(self): |
| 52 | print(self.result) | 51 | print(self.result) |
| 53 | 52 | ||
| 54 | def test_ParentSpaceChangePassword_success(self): | 53 | def test_ParentSpaceChangePassword_success(self): |
| 55 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 54 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 56 | postData = {'oldPass': self.oldPass, | 55 | postData = {'oldPass': self.oldPass, |
| 57 | 'newPass': '111111', | 56 | 'newPass': '222222', |
| 58 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND | 57 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND |
| 59 | } | 58 | } |
| 60 | r = requests.post(self.base_url, headers=headers, data=postData) | 59 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 61 | self.result = r.json() | 60 | self.result = r.json() |
| 62 | self.assertEqual(self.result['status'], 1, 'ParentSpacehangePassword Error') | 61 | self.assertEqual(self.result['status'], 1, 'ParentSpacehangePassword Error') |
| 63 | where = {'password': '111111', | 62 | where = {'password': '222222', |
| 64 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND } | 63 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND } |
| 65 | self.assertEqual(db_test.select_('acornuser.parents_space_pass', where), 1, 'ParentSpacehangePassword data Error') | 64 | self.assertEqual(CreateTestData.db_select('acornuser.parents_space_pass', where), 1, 'ParentSpacehangePassword data Error') |
| 66 | 65 | ||
| 67 | 66 | ||
| 68 | #家长控制忘记密码 | 67 | #家长控制忘记密码 |
| 69 | class ParentSpaceNewPassword(unittest.TestCase): | 68 | class ParentSpaceNewPassword(unittest.TestCase): |
| 70 | def setUp(self): | 69 | def setUp(self): |
| 71 | self.base_url = HOST_BOSS + '/parentsSpacePass/newpassword' | 70 | self.base_url = HOST_BOSS + '/parentsSpacePass/newpassword' |
| 72 | CreateTestData.pre_elecCard(Data.DEVICE_NUMBER_CUS_BIND) | 71 | CreateTestData.pre_elecCard(Data.DEVICE_NUMBER_CUS_BIND) |
| 73 | sql = "SELECT customerPhone FROM acornuser.ozing_customermachine where deviceNumber = '{}'".format(Data.DEVICE_NUMBER_CUS_BIND) | 72 | sql = "SELECT customerPhone FROM acornuser.ozing_customermachine where deviceNumber = '{}'".format(Data.DEVICE_NUMBER_CUS_BIND) |
| 74 | self.mobile = db_test.select(sql)[0]["customerPhone"].strip() | 73 | self.mobile = CreateTestData.db_select_bysql(sql)[0]["customerPhone"].strip() |
| 75 | self.auth = CreateTestData.fet_authCode(self.mobile) | 74 | self.auth = CreateTestData.fet_authCode(self.mobile) |
| 76 | 75 | ||
| 77 | def tearDown(self): | 76 | def tearDown(self): |
| 78 | pass | 77 | pass |
| 79 | 78 | ||
| 80 | def test_ParentSpaceNewPassword_success(self): | 79 | def test_ParentSpaceNewPassword_success(self): |
| 81 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 80 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 82 | postData = {'userName': self.mobile, | 81 | postData = {'userName': self.mobile, |
| 83 | 'authCode': self.auth, | 82 | 'authCode': self.auth, |
| 84 | 'password': '111111', | 83 | 'password': '111111', |
| 85 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND | 84 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND |
| 86 | } | 85 | } |
| 87 | r = requests.post(self.base_url, headers=headers, data=postData) | 86 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 88 | self.result = r.json() | 87 | self.result = r.json() |
| 89 | self.assertEqual(self.result['status'], 1, 'test_ParentSpaceNewPassword_success Error') | 88 | self.assertEqual(self.result['status'], 1, 'test_ParentSpaceNewPassword_success Error') |
| 90 | where = {'password': '111111', | 89 | where = {'password': '111111', |
| 91 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND } | 90 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND } |
| 92 | self.assertEqual(db_test.select_('acornuser.parents_space_pass', where), 1, 'ParentSpacehangePassword data Error') | 91 | self.assertEqual(CreateTestData.db_select('acornuser.parents_space_pass', where), 1, 'ParentSpacehangePassword data Error') |
| 93 | 92 | ||
| 94 | def test_ParentSpaceNewPassword_authCodeError(self): | 93 | def test_ParentSpaceNewPassword_authCodeError(self): |
| 95 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 94 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 96 | postData = {'userName': self.mobile, | 95 | postData = {'userName': self.mobile, |
| 97 | 'authCode': str(int(self.auth) - 1), | 96 | 'authCode': str(int(self.auth) - 1), |
| 98 | 'password': '111111', | 97 | 'password': '111111', |
| 99 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND | 98 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND |
| 100 | } | 99 | } |
| 101 | r = requests.post(self.base_url, headers=headers, data=postData) | 100 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 102 | self.result_2 = r.json() | 101 | self.result_2 = r.json() |
| 103 | self.assertEqual(self.result_2['status'], 1001, 'test_ParentSpaceNewPassword_success Error') | 102 | self.assertEqual(self.result_2['status'], 1001, 'test_ParentSpaceNewPassword_success Error') |
| 104 | 103 | ||
| 105 | 104 | ||
| 106 | 105 | ||
| 107 | 106 |
test_cases/personal_info.py
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
| 3 | 3 | ||
| 4 | import unittest | 4 | import unittest |
| 5 | import requests | 5 | import requests |
| 6 | from data_fixture.config_data import HOST_BOSS | 6 | from data_fixture.config_data import HOST_BOSS |
| 7 | from data_fixture import config_data as Data | 7 | from data_fixture import config_data as Data |
| 8 | from data_fixture import create_testdata | 8 | from data_fixture import create_testdata as CreateTestData |
| 9 | from data_fixture.mysql_db import DB | 9 | from data_fixture.mysql_db import DB |
| 10 | import os | 10 | import os |
| 11 | import uuid | 11 | import uuid |
| 12 | 12 | ||
| 13 | db_test = DB() | 13 | |
| 14 | current_dir = str(os.path.dirname(__file__)) | 14 | current_dir = str(os.path.dirname(__file__)) |
| 15 | 15 | ||
| 16 | #获取个人信息 | 16 | #获取个人信息 |
| 17 | class GetPersonalInfo(unittest.TestCase): | 17 | class GetPersonalInfo(unittest.TestCase): |
| 18 | def setUp(self): | 18 | def setUp(self): |
| 19 | self.base_url = HOST_BOSS + "/personal/get" | 19 | self.base_url = HOST_BOSS + "/personal/get" |
| 20 | self.subAccount = str(uuid.uuid4()).replace('-', '') | 20 | self.subAccount = str(uuid.uuid4()).replace('-', '') |
| 21 | create_testdata.pre_subAccount(Data.USER_ID, self.subAccount, 1) | 21 | CreateTestData.pre_subAccount(Data.USER_ID, self.subAccount, 1) |
| 22 | 22 | ||
| 23 | def tearDown(self): | 23 | def tearDown(self): |
| 24 | pass | 24 | pass |
| 25 | 25 | ||
| 26 | def test_getParentAccountInfo_success(self): | 26 | def test_getParentAccountInfo_success(self): |
| 27 | headers = {'Accept': '*/*'} | 27 | headers = {'Accept': '*/*'} |
| 28 | getData = {'userId': Data.USER_ID, 'type': 1} | 28 | getData = {'userId': Data.USER_ID, 'type': 1} |
| 29 | r = requests.get(self.base_url, headers=headers, params=getData) | 29 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 30 | self.result_1 = r.json() | 30 | self.result_1 = r.json() |
| 31 | self.assertEqual(self.result_1['status'], 1, 'get parent info fail') | 31 | self.assertEqual(self.result_1['status'], 1, 'get parent info fail') |
| 32 | 32 | ||
| 33 | def test_getChildAccountInfo_success(self): | 33 | def test_getChildAccountInfo_success(self): |
| 34 | headers = {'Accept': '*/*'} | 34 | headers = {'Accept': '*/*'} |
| 35 | getData = {'userId': Data.USER_ID, 'type': 2} | 35 | getData = {'userId': Data.USER_ID, 'type': 2} |
| 36 | r = requests.get(self.base_url, headers=headers, params=getData) | 36 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 37 | self.result_2 = r.json() | 37 | self.result_2 = r.json() |
| 38 | self.assertEqual(self.result_2['status'], 1, 'get child info fail') | 38 | self.assertEqual(self.result_2['status'], 1, 'get child info fail') |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | #修改个人信息 | 41 | #修改个人信息 |
| 42 | class UpdatePersonalInfo(unittest.TestCase): | 42 | class UpdatePersonalInfo(unittest.TestCase): |
| 43 | def setUp(self): | 43 | def setUp(self): |
| 44 | self.base_url = HOST_BOSS + "/personal/update" | 44 | self.base_url = HOST_BOSS + "/personal/update" |
| 45 | self.subAccount = str(uuid.uuid4()).replace('-', '') | 45 | self.subAccount = str(uuid.uuid4()).replace('-', '') |
| 46 | create_testdata.pre_subAccount(Data.PARENT_ID, self.subAccount, 1) | 46 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount, 1) |
| 47 | 47 | ||
| 48 | def tearDown(self): | 48 | def tearDown(self): |
| 49 | pass | 49 | pass |
| 50 | 50 | ||
| 51 | def test_UpdateParentInfo_success(self): | 51 | def test_UpdateParentInfo_success(self): |
| 52 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 52 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 53 | postData = { | 53 | postData = { |
| 54 | 'userId':Data.PARENT_ID, | 54 | 'userId':Data.PARENT_ID, |
| 55 | 'type': 1, | 55 | 'type': 1, |
| 56 | 'name':'主账户', | 56 | 'name':'主账户', |
| 57 | 'birthday':'2003-12-12', | 57 | 'birthday':'2003-12-12', |
| 58 | 'gradeId': '9', | 58 | 'gradeId': '9', |
| 59 | 'regionId' : '320100', | 59 | 'regionId' : '320100', |
| 60 | 'schoolId': '500018', | 60 | 'schoolId': '500018', |
| 61 | 'qq': '1313131313', | 61 | 'qq': '1313131313', |
| 62 | 'gender': 'female', | 62 | 'gender': 'female', |
| 63 | 'regionName': '江苏南京玄武', | 63 | 'regionName': '江苏南京玄武', |
| 64 | 'deviceNumber': Data.DEVICE_NUMBER_NEW, | 64 | 'deviceNumber': Data.DEVICE_NUMBER_NEW, |
| 65 | 'address':'幸福小区308' | 65 | 'address':'幸福小区308' |
| 66 | } | 66 | } |
| 67 | where_data_1 = {'id':Data.PARENT_ID, 'qq': '1313131313'} | 67 | where_data_1 = {'id':Data.PARENT_ID, 'qq': '1313131313'} |
| 68 | where_data_2 = {'user_id':Data.PARENT_ID, 'school_id': '500018'} | 68 | where_data_2 = {'user_id':Data.PARENT_ID, 'school_id': '500018'} |
| 69 | where_data_3 = {'user_id':Data.PARENT_ID, 'address':'幸福小区308'} | 69 | where_data_3 = {'user_id':Data.PARENT_ID, 'address':'幸福小区308'} |
| 70 | r = requests.post(self.base_url, headers=headers, data=postData) | 70 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 71 | self.result_1 = r.json() | 71 | self.result_1 = r.json() |
| 72 | self.assertEqual(self.result_1['status'], 1, 'UpdateParentInfo ERROR') | 72 | self.assertEqual(self.result_1['status'], 1, 'UpdateParentInfo ERROR') |
| 73 | self.assertTrue(db_test.select_('acornuser.acorn_user', where_data_1), 1) | 73 | self.assertTrue(CreateTestData.db_select('acornuser.acorn_user', where_data_1), 1) |
| 74 | self.assertTrue(db_test.select_('acornuser.ozing_student', where_data_2), 1) | 74 | self.assertTrue(CreateTestData.db_select('acornuser.ozing_student', where_data_2), 1) |
| 75 | self.assertTrue(db_test.select_('acornuser.acorn_user_extra', where_data_3), 1) | 75 | self.assertTrue(CreateTestData.db_select('acornuser.acorn_user_extra', where_data_3), 1) |
| 76 | 76 | ||
| 77 | 77 | ||
| 78 | def test_UpdateChildInfo_success(self): | 78 | def test_UpdateChildInfo_success(self): |
| 79 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 79 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 80 | postData = { | 80 | postData = { |
| 81 | 'userId': Data.PARENT_ID, | 81 | 'userId': Data.PARENT_ID, |
| 82 | 'type': 2, | 82 | 'type': 2, |
| 83 | 'name': '子账户', | 83 | 'name': '子账户', |
| 84 | 'birthday': '2010-12-12', | 84 | 'birthday': '2010-12-12', |
| 85 | 'gradeId': '6', | 85 | 'gradeId': '6', |
| 86 | 'regionId': '330100', | 86 | 'regionId': '330100', |
| 87 | 'schoolId': '6129', | 87 | 'schoolId': '6129', |
| 88 | 'qq': '1515151515', | 88 | 'qq': '1515151515', |
| 89 | 'gender': 'female', | 89 | 'gender': 'female', |
| 90 | 'regionName': '浙江杭州西湖', | 90 | 'regionName': '浙江杭州西湖', |
| 91 | 'deviceNumber': Data.DEVICE_NUMBER_NEW, | 91 | 'deviceNumber': Data.DEVICE_NUMBER_NEW, |
| 92 | 'address': '鲜花小区808' | 92 | 'address': '鲜花小区808' |
| 93 | } | 93 | } |
| 94 | where_data_child = {'qq': '1515151515', 'address': '鲜花小区808'} | 94 | where_data_child = {'qq': '1515151515', 'address': '鲜花小区808'} |
| 95 | r = requests.post(self.base_url, headers=headers, data=postData) | 95 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 96 | self.result_2 = r.json() | 96 | self.result_2 = r.json() |
| 97 | self.assertEqual(self.result_2['status'], 1, 'UpdateParentInfo ERROR') | 97 | self.assertEqual(self.result_2['status'], 1, 'UpdateParentInfo ERROR') |
| 98 | self.assertTrue(db_test.select_('acornuser.child_user', where_data_child)) | 98 | self.assertTrue(CreateTestData.db_select('acornuser.child_user', where_data_child)) |
| 99 | 99 | ||
| 100 | 100 | ||
| 101 | # 添加和修改个性签名 | 101 | # 添加和修改个性签名 |
| 102 | class AddorUpdateSignature(unittest.TestCase): | 102 | class AddorUpdateSignature(unittest.TestCase): |
| 103 | def setUp(self): | 103 | def setUp(self): |
| 104 | self.base_url = HOST_BOSS + "/signature/addOrUpdateSignature" | 104 | self.base_url = HOST_BOSS + "/signature/addOrUpdateSignature" |
| 105 | self.subAccount = str(uuid.uuid4()).replace('-', '') | 105 | self.subAccount = str(uuid.uuid4()).replace('-', '') |
| 106 | create_testdata.pre_subAccount(Data.PARENT_ID, self.subAccount, 0) | 106 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount, 0) |
| 107 | create_testdata.checkSignatureExists(Data.PARENT_ID, 1) | 107 | CreateTestData.checkSignatureExists(Data.PARENT_ID, 1) |
| 108 | create_testdata.checkSignatureExists(self.subAccount, 2) | 108 | CreateTestData.checkSignatureExists(self.subAccount, 2) |
| 109 | 109 | ||
| 110 | def tearDown(self): | 110 | def tearDown(self): |
| 111 | pass | 111 | pass |
| 112 | 112 | ||
| 113 | def test_AddParentSignature_success(self): | 113 | def test_AddParentSignature_success(self): |
| 114 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 114 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 115 | postData = {'userId':Data.PARENT_ID, | 115 | postData = {'userId':Data.PARENT_ID, |
| 116 | 'signature':'who is the clever Polly 谁是聪明的鹦鹉', | 116 | 'signature':'who is the clever Polly 谁是聪明的鹦鹉', |
| 117 | 'type': 1} | 117 | 'type': 1} |
| 118 | r = requests.post(self.base_url, headers=headers, data=postData) | 118 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 119 | self.result_1 = r.json() | 119 | self.result_1 = r.json() |
| 120 | self.assertEqual(self.result_1['status'], 1, 'AddParentSignature ERROR') | 120 | self.assertEqual(self.result_1['status'], 1, 'AddParentSignature ERROR') |
| 121 | where_1 = {'user_id':Data.PARENT_ID, | 121 | where_1 = {'user_id':Data.PARENT_ID, |
| 122 | 'signature':'who is the clever Polly 谁是聪明的鹦鹉'} | 122 | 'signature':'who is the clever Polly 谁是聪明的鹦鹉'} |
| 123 | self.assertEqual(db_test.select_('acornuser.acorn_user_extra', where_1), 1) | 123 | self.assertEqual(CreateTestData.db_select('acornuser.acorn_user_extra', where_1), 1) |
| 124 | 124 | ||
| 125 | def test_UpdateParentSignature_success(self): | 125 | def test_UpdateParentSignature_success(self): |
| 126 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 126 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 127 | postData = {'userId':Data.PARENT_ID, | 127 | postData = {'userId':Data.PARENT_ID, |
| 128 | 'signature':'clever Polly 一只吵人的鹦鹉', | 128 | 'signature':'clever Polly 一只吵人的鹦鹉', |
| 129 | 'type': 1} | 129 | 'type': 1} |
| 130 | r = requests.post(self.base_url, headers=headers, data=postData) | 130 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 131 | self.result_2 = r.json() | 131 | self.result_2 = r.json() |
| 132 | self.assertEqual(self.result_2['status'], 1, 'UpdateParentSignature ERROR') | 132 | self.assertEqual(self.result_2['status'], 1, 'UpdateParentSignature ERROR') |
| 133 | where_2 = {'user_id':Data.PARENT_ID, | 133 | where_2 = {'user_id':Data.PARENT_ID, |
| 134 | 'signature':'clever Polly 一只吵人的鹦鹉'} | 134 | 'signature':'clever Polly 一只吵人的鹦鹉'} |
| 135 | self.assertEqual(db_test.select_('acornuser.acorn_user_extra', where_2), 1, 'UpdateParentSignature ERROR') | 135 | self.assertEqual(CreateTestData.db_select('acornuser.acorn_user_extra', where_2), 1, 'UpdateParentSignature ERROR') |
| 136 | 136 | ||
| 137 | def test_AddChildSignature_success(self): | 137 | def test_AddChildSignature_success(self): |
| 138 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 138 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 139 | postData = {'userId':self.subAccount, | 139 | postData = {'userId':self.subAccount, |
| 140 | 'signature':'Polly can you spell its name 波利', | 140 | 'signature':'Polly can you spell its name 波利', |
| 141 | 'type': 2} | 141 | 'type': 2} |
| 142 | r = requests.post(self.base_url, headers=headers, data=postData) | 142 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 143 | self.result_3 = r.json() | 143 | self.result_3 = r.json() |
| 144 | self.assertEqual(self.result_3['status'], 1, 'AddChildSignature ERROR') | 144 | self.assertEqual(self.result_3['status'], 1, 'AddChildSignature ERROR') |
| 145 | where_1 = {'sub_account_id':self.subAccount, | 145 | where_1 = {'sub_account_id':self.subAccount, |
| 146 | 'signature':'Polly can you spell its name 波利'} | 146 | 'signature':'Polly can you spell its name 波利'} |
| 147 | self.assertEqual(db_test.select_('acornuser.subAccount_user_extra', where_1), 1, 'AddChildSignature ERROR') | 147 | self.assertEqual(CreateTestData.db_select('acornuser.subAccount_user_extra', where_1), 1, 'AddChildSignature ERROR') |
| 148 | 148 | ||
| 149 | def test_UpdateChildSignature_success(self): | 149 | def test_UpdateChildSignature_success(self): |
| 150 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 150 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 151 | postData = {'userId':self.subAccount, | 151 | postData = {'userId':self.subAccount, |
| 152 | 'signature':'波利 P-O-L-L-Y', | 152 | 'signature':'波利 P-O-L-L-Y', |
| 153 | 'type': 2} | 153 | 'type': 2} |
| 154 | r = requests.post(self.base_url, headers=headers, data=postData) | 154 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 155 | self.result_4 = r.json() | 155 | self.result_4 = r.json() |
| 156 | self.assertEqual(self.result_4['status'], 1, 'UPDATEChildSignature ERROR') | 156 | self.assertEqual(self.result_4['status'], 1, 'UPDATEChildSignature ERROR') |
| 157 | where_1 = {'sub_account_id':self.subAccount, | 157 | where_1 = {'sub_account_id':self.subAccount, |
| 158 | 'signature':'波利 P-O-L-L-Y'} | 158 | 'signature':'波利 P-O-L-L-Y'} |
| 159 | self.assertEqual(db_test.select_('acornuser.subAccount_user_extra', where_1), 1, 'UPDATEChildSignature ERROR') | 159 | self.assertEqual(CreateTestData.db_select('acornuser.subAccount_user_extra', where_1), 1, 'UPDATEChildSignature ERROR') |
| 160 | 160 | ||
| 161 | 161 | ||
| 162 | # 显示个性签名 | 162 | # 显示个性签名 |
| 163 | class GetSignature(unittest.TestCase): | 163 | class GetSignature(unittest.TestCase): |
| 164 | def setUp(self): | 164 | def setUp(self): |
| 165 | self.base_url = HOST_BOSS + "/signature/info" | 165 | self.base_url = HOST_BOSS + "/signature/info" |
| 166 | self.subAccount = str(uuid.uuid4()).replace('-', '') | 166 | self.subAccount = str(uuid.uuid4()).replace('-', '') |
| 167 | create_testdata.checkSignatureExists(Data.PARENT_ID, 1) | 167 | CreateTestData.checkSignatureExists(Data.PARENT_ID, 1) |
| 168 | create_testdata.checkSignatureExists(self.subAccount, 2) | 168 | CreateTestData.checkSignatureExists(self.subAccount, 2) |
| 169 | 169 | ||
| 170 | def tearDown(self): | 170 | def tearDown(self): |
| 171 | pass | 171 | pass |
| 172 | 172 | ||
| 173 | def test_getParentSignature_success(self): | 173 | def test_getParentSignature_success(self): |
| 174 | headers = {'Accept': '*/*'} | 174 | headers = {'Accept': '*/*'} |
| 175 | getData = {'userId': Data.PARENT_ID, 'type': 1} | 175 | getData = {'userId': Data.PARENT_ID, 'type': 1} |
| 176 | r = requests.get(self.base_url, headers=headers, params=getData) | 176 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 177 | self.result_1 = r.json() | 177 | self.result_1 = r.json() |
| 178 | self.assertEqual(self.result_1['status'], 1, 'get parent Signature fail') | 178 | self.assertEqual(self.result_1['status'], 1, 'get parent Signature fail') |
| 179 | 179 | ||
| 180 | def test_getChildSignature_success(self): | 180 | def test_getChildSignature_success(self): |
| 181 | headers = {'Accept': '*/*'} | 181 | headers = {'Accept': '*/*'} |
| 182 | getData = {'userId': self.subAccount, 'type': 2} | 182 | getData = {'userId': self.subAccount, 'type': 2} |
| 183 | r = requests.get(self.base_url, headers=headers, params=getData) | 183 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 184 | self.result_2 = r.json() | 184 | self.result_2 = r.json() |
| 185 | self.assertEqual(self.result_2['status'], 1, 'get child Signature fail') | 185 | self.assertEqual(self.result_2['status'], 1, 'get child Signature fail') |
| 186 | 186 | ||
| 187 | 187 | ||
| 188 | #更新用户头像 -- 默认图片 | 188 | #更新用户头像 -- 默认图片 |
| 189 | class UpdatePortraitDefault(unittest.TestCase): | 189 | class UpdatePortraitDefault(unittest.TestCase): |
| 190 | def setUp(self): | 190 | def setUp(self): |
| 191 | self.base_url = HOST_BOSS + "/profile/picture/default" | 191 | self.base_url = HOST_BOSS + "/profile/picture/default" |
| 192 | self.subAccount = str(uuid.uuid4()).replace('-', '') | 192 | self.subAccount = str(uuid.uuid4()).replace('-', '') |
| 193 | create_testdata.pre_subAccount(Data.PARENT_ID, self.subAccount, 0) | 193 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount, 0) |
| 194 | 194 | ||
| 195 | def tearDown(self): | 195 | def tearDown(self): |
| 196 | pass | 196 | pass |
| 197 | 197 | ||
| 198 | def test_UpdateParentPortraitDefault_success(self): | 198 | def test_UpdateParentPortraitDefault_success(self): |
| 199 | headers = {'Accept': '*/*', 'Content-Type':'application/x-www-form-urlencoded'} | 199 | headers = {'Accept': '*/*', 'Content-Type':'application/x-www-form-urlencoded'} |
| 200 | postData = {'userId': Data.PARENT_ID, 'type': 1, | 200 | postData = {'userId': Data.PARENT_ID, 'type': 1, |
| 201 | 'defaultImg':'http://hjxprodbucket.oss.aliyuncs.com/static/upload/boss_api/announcement/2017-08-29/61e8d8cf-651f-49c9-beb2-ff1387af390a.png'} | 201 | 'defaultImg':'http://hjxprodbucket.oss.aliyuncs.com/static/upload/boss_api/announcement/2017-08-29/61e8d8cf-651f-49c9-beb2-ff1387af390a.png'} |
| 202 | r = requests.post(self.base_url, headers=headers, data=postData) | 202 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 203 | self.result_1 = r.json() | 203 | self.result_1 = r.json() |
| 204 | self.assertEqual(self.result_1['status'], 1, 'UpdateParentPortrait fail') | 204 | self.assertEqual(self.result_1['status'], 1, 'UpdateParentPortrait fail') |
| 205 | where = {'user_id': Data.PARENT_ID, | 205 | where = {'user_id': Data.PARENT_ID, |
| 206 | 'portrait':'static/upload/boss_api/announcement/2017-08-29/61e8d8cf-651f-49c9-beb2-ff1387af390a.png'} | 206 | 'portrait':'static/upload/boss_api/announcement/2017-08-29/61e8d8cf-651f-49c9-beb2-ff1387af390a.png'} |
| 207 | self.assertEqual(db_test.select_('acornuser.ozing_student', where), 1, 'UpdateParentPortraitDefault fail') | 207 | self.assertEqual(CreateTestData.db_select('acornuser.ozing_student', where), 1, 'UpdateParentPortraitDefault fail') |
| 208 | 208 | ||
| 209 | def test_UpdateChildPortraitDefault_success(self): | 209 | def test_UpdateChildPortraitDefault_success(self): |
| 210 | headers = {'Accept': '*/*', 'Content-Type':'application/x-www-form-urlencoded'} | 210 | headers = {'Accept': '*/*', 'Content-Type':'application/x-www-form-urlencoded'} |
| 211 | postData = {'userId': self.subAccount, 'type': 2, | 211 | postData = {'userId': self.subAccount, 'type': 2, |
| 212 | 'defaultImg': 'http://hjxprodbucket.oss.aliyuncs.com/static/upload/boss_api/announcement/2017-08-29/61e8d8cf-651f-49c9-beb2-ff1387af390a.png'} | 212 | 'defaultImg': 'http://hjxprodbucket.oss.aliyuncs.com/static/upload/boss_api/announcement/2017-08-29/61e8d8cf-651f-49c9-beb2-ff1387af390a.png'} |
| 213 | r = requests.post(self.base_url, headers=headers, data=postData) | 213 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 214 | self.result_2 = r.json() | 214 | self.result_2 = r.json() |
| 215 | self.assertEqual(self.result_2['status'], 1, 'UpdateChildPortrait fail') | 215 | self.assertEqual(self.result_2['status'], 1, 'UpdateChildPortrait fail') |
| 216 | where = {'subAccountId': self.subAccount, | 216 | where = {'subAccountId': self.subAccount, |
| 217 | 'image': 'static/upload/boss_api/announcement/2017-08-29/61e8d8cf-651f-49c9-beb2-ff1387af390a.png'} | 217 | 'image': 'static/upload/boss_api/announcement/2017-08-29/61e8d8cf-651f-49c9-beb2-ff1387af390a.png'} |
| 218 | self.assertEqual(db_test.select_('acornuser.child_user', where), 1, 'UpdateChildPortraitDefault fail') | 218 | self.assertEqual(CreateTestData.db_select('acornuser.child_user', where), 1, 'UpdateChildPortraitDefault fail') |
| 219 | 219 | ||
| 220 | 220 | ||
| 221 | #更新用户头像-- 上传文件 | 221 | #更新用户头像-- 上传文件 |
| 222 | class UpdatePortrait(unittest.TestCase): | 222 | class UpdatePortrait(unittest.TestCase): |
| 223 | def setUp(self): | 223 | def setUp(self): |
| 224 | self.base_url = HOST_BOSS + "/profile/picture/update" | 224 | self.base_url = HOST_BOSS + "/profile/picture/update" |
| 225 | img_file_1 = current_dir + '/1.jpg' | 225 | img_file_1 = current_dir + '/1.jpg' |
| 226 | img_file_2 = current_dir + '/1.png' | 226 | img_file_2 = current_dir + '/1.png' |
| 227 | self.img_1 = open(img_file_1, 'rb') | 227 | self.img_1 = open(img_file_1, 'rb') |
| 228 | self.img_2 = open(img_file_2, 'rb') | 228 | self.img_2 = open(img_file_2, 'rb') |
| 229 | self.subAccount = str(uuid.uuid4()).replace('-', '') | 229 | self.subAccount = str(uuid.uuid4()).replace('-', '') |
| 230 | create_testdata.pre_subAccount(Data.PARENT_ID, self.subAccount, 0) | 230 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount, 0) |
| 231 | 231 | ||
| 232 | def tearDown(self): | 232 | def tearDown(self): |
| 233 | pass | 233 | pass |
| 234 | 234 | ||
| 235 | def test_UpdateParentPortraitDefault_success(self): | 235 | def test_UpdateParentPortraitDefault_success(self): |
| 236 | headers = {'Accept': '*/*', 'Content-Type':'multipart/form-data; boundary=cada83b1d4b82a7ccd28ae8f7f6d6'} | 236 | headers = {'Accept': '*/*', 'Content-Type':'multipart/form-data; boundary=cada83b1d4b82a7ccd28ae8f7f6d6'} |
| 237 | postData = {'userId': Data.PARENT_ID, 'type': 1} | 237 | postData = {'userId': Data.PARENT_ID, 'type': 1} |
| 238 | file = {'img': self.img_1} | 238 | file = {'img': self.img_1} |
| 239 | r = requests.post(self.base_url, data=postData, files=file) | 239 | r = requests.post(self.base_url, data=postData, files=file) |
| 240 | ss = r.request | 240 | ss = r.request |
| 241 | self.img_1.close() | 241 | self.img_1.close() |
| 242 | self.result_1 = r.json() | 242 | self.result_1 = r.json() |
| 243 | self.assertEqual(self.result_1['status'], 1, 'UpdateParentPortrait fail') | 243 | self.assertEqual(self.result_1['status'], 1, 'UpdateParentPortrait fail') |
| 244 | self.assertEqual(len(self.result_1['data']), 1, 'UpdateParentPortrait data fail') | 244 | self.assertEqual(len(self.result_1['data']), 1, 'UpdateParentPortrait data fail') |
| 245 | 245 | ||
| 246 | def test_UpdateChildPortrait_success(self): | 246 | def test_UpdateChildPortrait_success(self): |
| 247 | headers = {'Accept': '*/*', 'Content-Type':'multipart/form-data; boundary=fa0cada83b1d4b82a7ccd28ae8f7f6d6'} | 247 | headers = {'Accept': '*/*', 'Content-Type':'multipart/form-data; boundary=fa0cada83b1d4b82a7ccd28ae8f7f6d6'} |
| 248 | postData = {'userId': self.subAccount, 'type': 2} | 248 | postData = {'userId': self.subAccount, 'type': 2} |
| 249 | file = {'img': self.img_2} | 249 | file = {'img': self.img_2} |
| 250 | r = requests.post(self.base_url, data=postData, files=file) | 250 | r = requests.post(self.base_url, data=postData, files=file) |
| 251 | ss = r.request | 251 | ss = r.request |
| 252 | self.img_2.close() | 252 | self.img_2.close() |
| 253 | self.result_2 = r.json() | 253 | self.result_2 = r.json() |
| 254 | self.assertEqual(self.result_2['status'], 1, 'UpdateChildPortrait fail') | 254 | self.assertEqual(self.result_2['status'], 1, 'UpdateChildPortrait fail') |
| 255 | self.assertEqual(len(self.result_2['data']), 1, 'UpdateChildPortrait data fail') | 255 | self.assertEqual(len(self.result_2['data']), 1, 'UpdateChildPortrait data fail') |
| 256 | 256 | ||
| 257 | 257 | ||
| 258 | 258 |
test_cases/press.py
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
| 3 | 3 | ||
| 4 | import unittest | 4 | import unittest |
| 5 | import requests | 5 | import requests |
| 6 | from data_fixture.config_data import HOST_BOSS | 6 | from data_fixture.config_data import HOST_BOSS |
| 7 | from data_fixture import create_testdata as CreateTestData | 7 | from data_fixture import create_testdata as CreateTestData |
| 8 | from data_fixture import config_data as Data | 8 | from data_fixture import config_data as Data |
| 9 | from data_fixture.mysql_db import DB | 9 | from data_fixture.mysql_db import DB |
| 10 | 10 | ||
| 11 | db_test = DB() | ||
| 12 | 11 | ||
| 13 | 12 | ||
| 14 | # 获取教材版本列表 | 13 | # 获取教材版本列表 |
| 15 | class GetPressList(unittest.TestCase): | 14 | class GetPressList(unittest.TestCase): |
| 16 | def setUp(self): | 15 | def setUp(self): |
| 17 | self.base_url = HOST_BOSS + '/press/list' | 16 | self.base_url = HOST_BOSS + '/press/list' |
| 18 | 17 | ||
| 19 | def tearDown(self): | 18 | def tearDown(self): |
| 20 | print(self.result) | 19 | print(self.result) |
| 21 | 20 | ||
| 22 | def test_getPressList_success(self): | 21 | def test_getPressList_success(self): |
| 23 | headers = {'Accept': '*/*'} | 22 | headers = {'Accept': '*/*'} |
| 24 | getData = {'subjectName': '数学'} | 23 | getData = {'subjectName': '数学'} |
| 25 | r = requests.get(self.base_url, headers=headers, params=getData) | 24 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 26 | self.result = r.json() | 25 | self.result = r.json() |
| 27 | self.assertEqual(self.result['status'], 1, 'getPressList Error') | 26 | self.assertEqual(self.result['status'], 1, 'getPressList Error') |
| 28 | self.assertTrue(len(self.result['data']) > 1, 'getPressList data Error') | 27 | self.assertTrue(len(self.result['data']) > 1, 'getPressList data Error') |
| 29 | 28 | ||
| 30 | 29 | ||
| 31 | # 获取用户版本信息接口 | 30 | # 获取用户版本信息接口 |
| 32 | class GetUserPressInfo(unittest.TestCase): | 31 | class GetUserPressInfo(unittest.TestCase): |
| 33 | def setUp(self): | 32 | def setUp(self): |
| 34 | self.base_url = HOST_BOSS + '/userPress/info' | 33 | self.base_url = HOST_BOSS + '/userPress/info' |
| 35 | CreateTestData.pre_GetUserPressInfo(Data.USER_ID) | 34 | CreateTestData.pre_GetUserPressInfo(Data.USER_ID) |
| 36 | 35 | ||
| 37 | def tearDown(self): | 36 | def tearDown(self): |
| 38 | print(self.result) | 37 | print(self.result) |
| 39 | 38 | ||
| 40 | def test_getPressList_success(self): | 39 | def test_getPressList_success(self): |
| 41 | headers = {'Accept': '*/*'} | 40 | headers = {'Accept': '*/*'} |
| 42 | getData = {'userId': Data.USER_ID, 'gradeId': 9} | 41 | getData = {'userId': Data.USER_ID, 'gradeId': 9} |
| 43 | r = requests.get(self.base_url, headers=headers, params=getData) | 42 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 44 | self.result = r.json() | 43 | self.result = r.json() |
| 45 | self.assertEqual(self.result['status'], 1, 'GetUserPressInfo Error') | 44 | self.assertEqual(self.result['status'], 1, 'GetUserPressInfo Error') |
| 46 | data = self.result['data'] | 45 | data = self.result['data'] |
| 47 | for item in data: | 46 | for item in data: |
| 48 | if item['subject'] == '语文': | 47 | if item['subject'] == '语文': |
| 49 | press_to_check = item['press'] | 48 | press_to_check = item['press'] |
| 50 | self.assertEqual(press_to_check, '北京师范大学出版社', 'GetUserPressInfo data Error') | 49 | self.assertEqual(press_to_check, '北京师范大学出版社', 'GetUserPressInfo data Error') |
| 51 | 50 | ||
| 52 | 51 | ||
| 53 | # 修改版本信息接口 | 52 | # 修改版本信息接口 |
| 54 | class UpdateUserPressInfo(unittest.TestCase): | 53 | class UpdateUserPressInfo(unittest.TestCase): |
| 55 | def setUp(self): | 54 | def setUp(self): |
| 56 | self.base_url = HOST_BOSS + '/userPress/update' | 55 | self.base_url = HOST_BOSS + '/userPress/update' |
| 57 | 56 | ||
| 58 | def tearDown(self): | 57 | def tearDown(self): |
| 59 | print(self.result) | 58 | print(self.result) |
| 60 | 59 | ||
| 61 | def test_getPressList_success(self): | 60 | def test_getPressList_success(self): |
| 62 | headers = {'Accept': '*/*', 'Content-Type': 'application/x-www-form-urlencoded'} | 61 | headers = {'Accept': '*/*', 'Content-Type': 'application/x-www-form-urlencoded'} |
| 63 | postData = {'userId': Data.USER_ID, | 62 | postData = {'userId': Data.USER_ID, |
| 64 | 'chemistry': '山东教育出版社', | 63 | 'chemistry': '山东教育出版社', |
| 65 | 'chinese': '江苏教育出版社', | 64 | 'chinese': '江苏教育出版社', |
| 66 | 'biology': '人民教育出版社', | 65 | 'biology': '人民教育出版社', |
| 67 | 'geography': '人民教育出版社', | 66 | 'geography': '人民教育出版社', |
| 68 | 'physics': '人民教育出版社', | 67 | 'physics': '人民教育出版社', |
| 69 | 'english': '外语教学与研究出版社', | 68 | 'english': '外语教学与研究出版社', |
| 70 | 'political': '人民教育出版社', | 69 | 'political': '人民教育出版社', |
| 71 | 'math': '江苏科学技术出版社', | 70 | 'math': '江苏科学技术出版社', |
| 72 | 'history': '人民教育出版社' | 71 | 'history': '人民教育出版社' |
| 73 | } | 72 | } |
| 74 | r = requests.post(self.base_url, headers=headers, data=postData) | 73 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 75 | self.result = r.json() | 74 | self.result = r.json() |
| 76 | self.assertEqual(self.result['status'], 1, 'UpdateUserPressInfo Error') | 75 | self.assertEqual(self.result['status'], 1, 'UpdateUserPressInfo Error') |
| 77 | where = {'user_id': Data.USER_ID, | 76 | where = {'user_id': Data.USER_ID, |
| 78 | 'chemistry': '山东教育出版社', | 77 | 'chemistry': '山东教育出版社', |
| 79 | 'chinese': '江苏教育出版社', | 78 | 'chinese': '江苏教育出版社', |
| 80 | 'biology': '人民教育出版社', | 79 | 'biology': '人民教育出版社', |
| 81 | 'geography': '人民教育出版社', | 80 | 'geography': '人民教育出版社', |
| 82 | 'physics': '人民教育出版社', | 81 | 'physics': '人民教育出版社', |
| 83 | 'english': '外语教学与研究出版社', | 82 | 'english': '外语教学与研究出版社', |
| 84 | 'political': '人民教育出版社', | 83 | 'political': '人民教育出版社', |
| 85 | 'math': '江苏科学技术出版社', | 84 | 'math': '江苏科学技术出版社', |
| 86 | 'history': '人民教育出版社' | 85 | 'history': '人民教育出版社' |
| 87 | } | 86 | } |
| 88 | self.assertEqual(db_test.select_('acornuser.user_press', where), 1, 'UpdateUserPressInfo data Error') | 87 | self.assertEqual(CreateTestData.db_select('acornuser.user_press', where), 1, 'UpdateUserPressInfo data Error') |
| 89 | 88 | ||
| 90 | 89 | ||
| 91 | 90 | ||
| 92 | 91 |
test_cases/register.py
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
| 3 | 3 | ||
| 4 | import unittest | 4 | import unittest |
| 5 | import requests | 5 | import requests |
| 6 | from data_fixture.config_data import HOST_BOSS | 6 | from data_fixture.config_data import HOST_BOSS |
| 7 | from data_fixture import create_testdata as CreateTestData | 7 | from data_fixture import create_testdata as CreateTestData |
| 8 | from data_fixture import config_data as Data | 8 | from data_fixture import config_data as Data |
| 9 | from data_fixture.mysql_db import DB | 9 | from data_fixture.mysql_db import DB |
| 10 | import os | 10 | import os |
| 11 | 11 | ||
| 12 | db_test = DB() | 12 | |
| 13 | current_dir = str(os.path.dirname(__file__)) | 13 | current_dir = str(os.path.dirname(__file__)) |
| 14 | 14 | ||
| 15 | #手机号重复验证 | 15 | #手机号重复验证 |
| 16 | class PhoneUsedCheck(unittest.TestCase): | 16 | class PhoneUsedCheck(unittest.TestCase): |
| 17 | def setUp(self): | 17 | def setUp(self): |
| 18 | self.base_url = HOST_BOSS + "/ozing/timer/user/registered" | 18 | self.base_url = HOST_BOSS + "/ozing/timer/user/registered" |
| 19 | CreateTestData.pre_phoneUsedCheck(Data.USER_PHONE_USED, True) | 19 | CreateTestData.pre_phoneUsedCheck(Data.USER_PHONE_USED, True) |
| 20 | CreateTestData.pre_phoneUsedCheck(Data.USER_PHONE_UNUSED, False) | 20 | CreateTestData.pre_phoneUsedCheck(Data.USER_PHONE_UNUSED, False) |
| 21 | 21 | ||
| 22 | def tearDown(self): | 22 | def tearDown(self): |
| 23 | print(self.result) | 23 | print(self.result) |
| 24 | 24 | ||
| 25 | # 注册过的手机号 | 25 | # 注册过的手机号 |
| 26 | def test_phone_used(self): | 26 | def test_phone_used(self): |
| 27 | getData = {'mobile':Data.USER_PHONE_USED} | 27 | getData = {'mobile':Data.USER_PHONE_USED} |
| 28 | r = requests.get(self.base_url, params=getData) | 28 | r = requests.get(self.base_url, params=getData) |
| 29 | self.result = r.json() | 29 | self.result = r.json() |
| 30 | self.assertEqual(self.result['status'], True) | 30 | self.assertEqual(self.result['status'], True) |
| 31 | 31 | ||
| 32 | # 手机号未注册 | 32 | # 手机号未注册 |
| 33 | def test_phone_unused(self): | 33 | def test_phone_unused(self): |
| 34 | getData = {'mobile':Data.USER_PHONE_UNUSED} | 34 | getData = {'mobile':Data.USER_PHONE_UNUSED} |
| 35 | r = requests.get(self.base_url, params=getData) | 35 | r = requests.get(self.base_url, params=getData) |
| 36 | self.result = r.json() | 36 | self.result = r.json() |
| 37 | self.assertEqual(self.result['status'], False) | 37 | self.assertEqual(self.result['status'], False) |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | # 获取验证码 --register | 40 | # 获取验证码 --register |
| 41 | class GetAuthCode(unittest.TestCase): | 41 | class GetAuthCode(unittest.TestCase): |
| 42 | def setUp(self): | 42 | def setUp(self): |
| 43 | self.base_url = HOST_BOSS + "/ozing/timer/user/fetchAuthCode" | 43 | self.base_url = HOST_BOSS + "/ozing/timer/user/fetchAuthCode" |
| 44 | self.mobile = '13833333333' | 44 | self.mobile = '13833333333' |
| 45 | 45 | ||
| 46 | def tearDown(self): | 46 | def tearDown(self): |
| 47 | print(self.result) | 47 | print(self.result) |
| 48 | 48 | ||
| 49 | def test_getAuthCode_success(self): | 49 | def test_getAuthCode_success(self): |
| 50 | headers = {'Accept': '*/*'} | 50 | headers = {'Accept': '*/*'} |
| 51 | postData = {'mobile': self.mobile, 'type': 'register'} | 51 | postData = {'mobile': self.mobile, 'type': 'register'} |
| 52 | r = requests.post(self.base_url, headers=headers, data=postData) | 52 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 53 | self.result = r.json() | 53 | self.result = r.json() |
| 54 | self.assertEqual(self.result['status'], 100) | 54 | self.assertEqual(self.result['status'], 100) |
| 55 | 55 | ||
| 56 | 56 | ||
| 57 | #用户注册 | 57 | #用户注册 |
| 58 | class SignIn(unittest.TestCase): | 58 | class SignIn(unittest.TestCase): |
| 59 | def setUp(self): | 59 | def setUp(self): |
| 60 | self.base_url = HOST_BOSS + "/ozing/timer/anking/user" | 60 | self.base_url = HOST_BOSS + "/ozing/timer/anking/user" |
| 61 | self.smsCode = CreateTestData.fet_authCode(Data.USER_PHONE) | 61 | self.smsCode = CreateTestData.fet_authCode(Data.USER_PHONE) |
| 62 | CreateTestData.pre_phoneUsedCheck(Data.USER_PHONE, False) | 62 | CreateTestData.pre_phoneUsedCheck(Data.USER_PHONE, False) |
| 63 | 63 | ||
| 64 | def tearDown(self): | 64 | def tearDown(self): |
| 65 | print(self.result) | 65 | print(self.result) |
| 66 | 66 | ||
| 67 | def test_signIn_success(self): | 67 | def test_signIn_success(self): |
| 68 | headers = {'Content-Type': 'application/json', 'Accept': '*/*'} | 68 | headers = {'Content-Type': 'application/json', 'Accept': '*/*'} |
| 69 | postData = { | 69 | postData = { |
| 70 | "username": Data.USER_PHONE, | 70 | "username": Data.USER_PHONE, |
| 71 | "password": 'Hjx111111', | 71 | "password": 'Hjx111111', |
| 72 | "source": 'Android', | 72 | "source": 'Android', |
| 73 | "smscode": self.smsCode | 73 | "smscode": self.smsCode |
| 74 | } | 74 | } |
| 75 | r = requests.post(self.base_url, headers=headers, json=postData) | 75 | r = requests.post(self.base_url, headers=headers, json=postData) |
| 76 | self.result = r.json() | 76 | self.result = r.json() |
| 77 | self.assertEqual(self.result['status'], 100) | 77 | self.assertEqual(self.result['status'], 100) |
| 78 | 78 | ||
| 79 | 79 | ||
| 80 | # 检查用户注册信息是否完整 | 80 | # 检查用户注册信息是否完整 |
| 81 | class RegisterExtrainfoCheck(unittest.TestCase): | 81 | class RegisterExtrainfoCheck(unittest.TestCase): |
| 82 | def setUp(self): | 82 | def setUp(self): |
| 83 | self.base_url = HOST_BOSS + '/register/extrainfo/check' | 83 | self.base_url = HOST_BOSS + '/register/extrainfo/check' |
| 84 | CreateTestData.pre_register_extrainfo_check(Data.USER_ID, True) | 84 | CreateTestData.pre_register_extrainfo_check(Data.USER_ID, True) |
| 85 | CreateTestData.pre_register_extrainfo_check(Data.USER_ID_INCOMPLETE, False) | 85 | CreateTestData.pre_register_extrainfo_check(Data.USER_ID_INCOMPLETE, False) |
| 86 | 86 | ||
| 87 | def tearDown(self): | 87 | def tearDown(self): |
| 88 | pass | 88 | pass |
| 89 | 89 | ||
| 90 | def test_checkRegisterExtrainfo_Complete_success(self): | 90 | def test_checkRegisterExtrainfo_Complete_success(self): |
| 91 | headers = {'Accept': '*/*'} | 91 | headers = {'Accept': '*/*'} |
| 92 | getData = {'userId': Data.USER_ID} | 92 | getData = {'userId': Data.USER_ID} |
| 93 | r = requests.get(self.base_url, headers=headers, params=getData) | 93 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 94 | self.result_1 = r.json() | 94 | self.result_1 = r.json() |
| 95 | self.assertEqual(self.result_1['status'], 1, 'test_checkRegisterExtrainfo_Complete fail') | 95 | self.assertEqual(self.result_1['status'], 1, 'test_checkRegisterExtrainfo_Complete fail') |
| 96 | self.assertEqual(self.result_1['data']['isRegisterInfoComplete'], True, 'test_checkRegisterExtrainfo_Complete data fail') | 96 | self.assertEqual(self.result_1['data']['isRegisterInfoComplete'], True, 'test_checkRegisterExtrainfo_Complete data fail') |
| 97 | 97 | ||
| 98 | def test_checkRegisterExtrainfo_inComplete_success(self): | 98 | def test_checkRegisterExtrainfo_inComplete_success(self): |
| 99 | headers = {'Accept': '*/*'} | 99 | headers = {'Accept': '*/*'} |
| 100 | getData = {'userId': Data.USER_ID_INCOMPLETE} | 100 | getData = {'userId': Data.USER_ID_INCOMPLETE} |
| 101 | r = requests.get(self.base_url, headers=headers, params=getData) | 101 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 102 | self.result_2 = r.json() | 102 | self.result_2 = r.json() |
| 103 | self.assertEqual(self.result_2['status'], 1, 'test_checkRegisterExtrainfo_inComplete fail') | 103 | self.assertEqual(self.result_2['status'], 1, 'test_checkRegisterExtrainfo_inComplete fail') |
| 104 | self.assertEqual(self.result_2['data']['isRegisterInfoComplete'], False, | 104 | self.assertEqual(self.result_2['data']['isRegisterInfoComplete'], False, |
| 105 | 'test_checkRegisterExtrainfo_inComplete data fail') | 105 | 'test_checkRegisterExtrainfo_inComplete data fail') |
| 106 | 106 | ||
| 107 | 107 | ||
| 108 | # 提交注册信息 | 108 | # 提交注册信息 |
| 109 | class RegisterExtrainfoSubmit(unittest.TestCase): | 109 | class RegisterExtrainfoSubmit(unittest.TestCase): |
| 110 | def setUp(self): | 110 | def setUp(self): |
| 111 | self.base_url = HOST_BOSS + '/register/extrainfo/submit' | 111 | self.base_url = HOST_BOSS + '/register/extrainfo/submit' |
| 112 | 112 | ||
| 113 | def tearDown(self): | 113 | def tearDown(self): |
| 114 | print(self.result) | 114 | print(self.result) |
| 115 | 115 | ||
| 116 | def test_RegisterExtrainfoSubmit_success(self): | 116 | def test_RegisterExtrainfoSubmit_success(self): |
| 117 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 117 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 118 | postData = { | 118 | postData = { |
| 119 | 'name': '测试测试lalalallal', | 119 | 'name': '测试测试lalalallal', |
| 120 | 'gradeId': 7, | 120 | 'gradeId': 7, |
| 121 | 'schoolId': 68779, | 121 | 'schoolId': 68779, |
| 122 | 'regionName': '浙江杭州西湖', | 122 | 'regionName': '浙江杭州西湖', |
| 123 | 'regionId': 330106, | 123 | 'regionId': 330106, |
| 124 | 'userId': Data.USER_ID, | 124 | 'userId': Data.USER_ID, |
| 125 | 'chinese': '北京出版社', | 125 | 'chinese': '北京出版社', |
| 126 | 'english': '人民教育出版社', | 126 | 'english': '人民教育出版社', |
| 127 | 'math': '人民教育出版社' | 127 | 'math': '人民教育出版社' |
| 128 | } | 128 | } |
| 129 | r = requests.post(self.base_url, headers=headers, data=postData) | 129 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 130 | self.result = r.json() | 130 | self.result = r.json() |
| 131 | self.assertEqual(self.result['status'], 1, 'RegisterExtrainfoSubmit Error') | 131 | self.assertEqual(self.result['status'], 1, 'RegisterExtrainfoSubmit Error') |
| 132 | where_1 = {'id': Data.USER_ID,'nickname': '测试测试lalalallal'} | 132 | where_1 = {'id': Data.USER_ID,'nickname': '测试测试lalalallal'} |
| 133 | where_2 = {'user_id': Data.USER_ID, | 133 | where_2 = {'user_id': Data.USER_ID, |
| 134 | 'grade_id': 7, | 134 | 'grade_id': 7, |
| 135 | 'school_id': 68779, | 135 | 'school_id': 68779, |
| 136 | 'region_name': '浙江杭州西湖', | 136 | 'region_name': '浙江杭州西湖', |
| 137 | 'region_id': 330106} | 137 | 'region_id': 330106} |
| 138 | where_3 = {'user_id': Data.USER_ID, | 138 | where_3 = {'user_id': Data.USER_ID, |
| 139 | 'chinese': '北京出版社', | 139 | 'chinese': '北京出版社', |
| 140 | 'english': '人民教育出版社', | 140 | 'english': '人民教育出版社', |
| 141 | 'math': '人民教育出版社' | 141 | 'math': '人民教育出版社' |
| 142 | } | 142 | } |
| 143 | self.assertEqual(db_test.select_('acornuser.acorn_user', where_1), 1, 'RegisterExtrainfoSubmit Error') | 143 | self.assertEqual(CreateTestData.db_select('acornuser.acorn_user', where_1), 1, 'RegisterExtrainfoSubmit Error') |
| 144 | self.assertEqual(db_test.select_('acornuser.ozing_student', where_2), 1, 'RegisterExtrainfoSubmit Error') | 144 | self.assertEqual(CreateTestData.db_select('acornuser.ozing_student', where_2), 1, 'RegisterExtrainfoSubmit Error') |
| 145 | self.assertEqual(db_test.select_('acornuser.user_press', where_3), 1, 'RegisterExtrainfoSubmit Error') | 145 | self.assertEqual(CreateTestData.db_select('acornuser.user_press', where_3), 1, 'RegisterExtrainfoSubmit Error') |
| 146 | 146 | ||
| 147 | 147 | ||
| 148 | #账户管理界面更换手机号绑定 | 148 | #账户管理界面更换手机号绑定 |
| 149 | class UpdateUserNameByUserId(unittest.TestCase): | 149 | class UpdateUserNameByUserId(unittest.TestCase): |
| 150 | def setUp(self): | 150 | def setUp(self): |
| 151 | self.base_url = HOST_BOSS + '/electronicCard/updateUserNameByUserId' | 151 | self.base_url = HOST_BOSS + '/electronicCard/updateUserNameByUserId' |
| 152 | self.authCode_1 = CreateTestData.fet_authCode(Data.USER_PHONE_CHANGE_EXISTS) | 152 | self.authCode_1 = CreateTestData.fet_authCode(Data.USER_PHONE_CHANGE_EXISTS) |
| 153 | self.authCode_2 = CreateTestData.fet_authCode(Data.USER_PHONE_CHANGE) | 153 | self.authCode_2 = CreateTestData.fet_authCode(Data.USER_PHONE_CHANGE) |
| 154 | CreateTestData.pre_phoneUsedCheck(Data.USER_PHONE_CHANGE_EXISTS, True) | 154 | CreateTestData.pre_phoneUsedCheck(Data.USER_PHONE_CHANGE_EXISTS, True) |
| 155 | CreateTestData.pre_phoneUsedCheck(Data.USER_PHONE_CHANGE, False) | 155 | CreateTestData.pre_phoneUsedCheck(Data.USER_PHONE_CHANGE, False) |
| 156 | 156 | ||
| 157 | def tearDown(self): | 157 | def tearDown(self): |
| 158 | print(self.result) | 158 | print(self.result) |
| 159 | 159 | ||
| 160 | def test_UpdateUserNameByUserId_phoneExists_success(self): | 160 | def test_UpdateUserNameByUserId_phoneExists_success(self): |
| 161 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 161 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 162 | postData = { | 162 | postData = { |
| 163 | 'username': Data.USER_PHONE_CHANGE_EXISTS, | 163 | 'username': Data.USER_PHONE_CHANGE_EXISTS, |
| 164 | 'authCode': self.authCode_1, | 164 | 'authCode': self.authCode_1, |
| 165 | 'userId': Data.USER_ID | 165 | 'userId': Data.USER_ID |
| 166 | } | 166 | } |
| 167 | r = requests.post(self.base_url, headers=headers, data=postData) | 167 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 168 | self.result = r.json() | 168 | self.result = r.json() |
| 169 | self.assertEqual(self.result['status'], 1006, 'UpdateUserNameByUserId_phoneExists Error') | 169 | self.assertEqual(self.result['status'], 1006, 'UpdateUserNameByUserId_phoneExists Error') |
| 170 | 170 | ||
| 171 | def test_UpdateUserNameByUserId_success(self): | 171 | def test_UpdateUserNameByUserId_success(self): |
| 172 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 172 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 173 | postData = { | 173 | postData = { |
| 174 | 'username': Data.USER_PHONE_CHANGE, | 174 | 'username': Data.USER_PHONE_CHANGE, |
| 175 | 'authCode': self.authCode_2, | 175 | 'authCode': self.authCode_2, |
| 176 | 'userId': Data.USER_ID | 176 | 'userId': Data.USER_ID |
| 177 | } | 177 | } |
| 178 | r = requests.post(self.base_url, headers=headers, data=postData) | 178 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 179 | self.result = r.json() | 179 | self.result = r.json() |
| 180 | self.assertEqual(self.result['status'], 1, 'UpdateUserNameByUserId Error') | 180 | self.assertEqual(self.result['status'], 1, 'UpdateUserNameByUserId Error') |
| 181 | 181 | ||
| 182 | 182 | ||
| 183 | # 添加用户反馈 | 183 | # 添加用户反馈 |
| 184 | class AddFeedBack(unittest.TestCase): | 184 | class AddFeedBack(unittest.TestCase): |
| 185 | def setUp(self): | 185 | def setUp(self): |
| 186 | self.base_url = HOST_BOSS + '/feedback/add' | 186 | self.base_url = HOST_BOSS + '/feedback/add' |
| 187 | img_file = current_dir + '/1.png' | 187 | img_file = current_dir + '/1.png' |
| 188 | self.img = open(img_file, 'rb') | 188 | self.img = open(img_file, 'rb') |
| 189 | 189 | ||
| 190 | def tearDown(self): | 190 | def tearDown(self): |
| 191 | print(self.result) | 191 | print(self.result) |
| 192 | 192 | ||
| 193 | def test_AddFeedBack_success(self): | 193 | def test_AddFeedBack_success(self): |
| 194 | headers = {'Content-Type': 'multipart/form-data; boundary=fa0cada83b1d4b82a7ccd28ae8f7f6d6', 'Accept': '*/*'} | 194 | headers = {'Content-Type': 'multipart/form-data; boundary=fa0cada83b1d4b82a7ccd28ae8f7f6d6', 'Accept': '*/*'} |
| 195 | postData = { | 195 | postData = { |
| 196 | 'userId': Data.USER_ID, | 196 | 'userId': Data.USER_ID, |
| 197 | 'content': '11111feedback哦哦哦', | 197 | 'content': '11111feedback哦哦哦', |
| 198 | 'contact': '00000000', | 198 | 'contact': '00000000', |
| 199 | 'feedtype': '个人中心' | 199 | 'feedtype': '个人中心' |
| 200 | } | 200 | } |
| 201 | file = {'imgs': self.img} | 201 | file = {'imgs': self.img} |
| 202 | 202 | ||
| 203 | r = requests.post(self.base_url, data=postData, files=file) | 203 | r = requests.post(self.base_url, data=postData, files=file) |
| 204 | #r = requests.post(self.base_url, headers=headers, data=postData) | 204 | #r = requests.post(self.base_url, headers=headers, data=postData) |
| 205 | ss = r.request | 205 | ss = r.request |
| 206 | self.img.close() | 206 | self.img.close() |
| 207 | self.result = r.json() | 207 | self.result = r.json() |
| 208 | self.assertEqual(self.result['status'], 1, 'AddFeedBack Error') | 208 | self.assertEqual(self.result['status'], 1, 'AddFeedBack Error') |
| 209 | select = {'userId': Data.USER_ID, | 209 | select = {'userId': Data.USER_ID, |
| 210 | 'content': '11111feedback哦哦哦', | 210 | 'content': '11111feedback哦哦哦', |
| 211 | 'contact': '00000000', | 211 | 'contact': '00000000', |
| 212 | 'feedtype': '个人中心'} | 212 | 'feedtype': '个人中心'} |
| 213 | self.assertTrue(db_test.select_('acornuser.feedback', select) > 0, 'AddFeedBack data insert Error') | 213 | self.assertTrue(CreateTestData.db_select('acornuser.feedback', select) > 0, 'AddFeedBack data insert Error') |
| 214 | 214 | ||
| 215 | 215 | ||
| 216 | # 获取最近观看视频列表 | 216 | # 获取最近观看视频列表 |
| 217 | class GetRecentVideo(unittest.TestCase): | 217 | class GetRecentVideo(unittest.TestCase): |
| 218 | def setUp(self): | 218 | def setUp(self): |
| 219 | self.base_url = HOST_BOSS + '/personal/video/recent' | 219 | self.base_url = HOST_BOSS + '/personal/video/recent' |
| 220 | CreateTestData.pre_getRecentVideo(Data.USER_ID_NO_VIDEO, 0) | 220 | CreateTestData.pre_getRecentVideo(Data.USER_ID_NO_VIDEO, 0) |
| 221 | CreateTestData.pre_getRecentVideo(Data.USER_ID_VIDEO, 1) | 221 | CreateTestData.pre_getRecentVideo(Data.USER_ID_VIDEO, 1) |
| 222 | 222 | ||
| 223 | def tearDown(self): | 223 | def tearDown(self): |
| 224 | pass | 224 | pass |
| 225 | 225 | ||
| 226 | def test_GetRecentVideo_noVideo_success(self): | 226 | def test_GetRecentVideo_noVideo_success(self): |
| 227 | getData = {'userId': Data.USER_ID_NO_VIDEO, | 227 | getData = {'userId': Data.USER_ID_NO_VIDEO, |
| 228 | 'pageNum': 1} | 228 | 'pageNum': 1} |
| 229 | r = requests.get(self.base_url, params=getData) | 229 | r = requests.get(self.base_url, params=getData) |
| 230 | self.result_1 = r.json() | 230 | self.result_1 = r.json() |
| 231 | self.assertEqual(self.result_1['status'], 1000, 'GetRecentVideo-noVideo fail') | 231 | self.assertEqual(self.result_1['status'], 1000, 'GetRecentVideo-noVideo fail') |
| 232 | 232 | ||
| 233 | def test_GetRecentVideo_success(self): | 233 | def test_GetRecentVideo_success(self): |
| 234 | getData = {'userId': Data.USER_ID_VIDEO, | 234 | getData = {'userId': Data.USER_ID_VIDEO, |
| 235 | 'pageNum': 1} | 235 | 'pageNum': 1} |
| 236 | r = requests.get(self.base_url, params=getData) | 236 | r = requests.get(self.base_url, params=getData) |
| 237 | self.result_2 = r.json() | 237 | self.result_2 = r.json() |
| 238 | self.assertEqual(self.result_2['status'], 1, 'GetRecentVideo fail') | 238 | self.assertEqual(self.result_2['status'], 1, 'GetRecentVideo fail') |
| 239 | 239 | ||
| 240 | 240 | ||
| 241 | 241 | ||
| 242 | 242 | ||
| 243 | 243 |
test_cases/sub_account.py
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
| 3 | 3 | ||
| 4 | import unittest | 4 | import unittest |
| 5 | import requests | 5 | import requests |
| 6 | from data_fixture.config_data import HOST_BOSS | 6 | from data_fixture.config_data import HOST_BOSS |
| 7 | from data_fixture import create_testdata as CreateTestData | 7 | from data_fixture import create_testdata as CreateTestData |
| 8 | from data_fixture import config_data as Data | 8 | from data_fixture import config_data as Data |
| 9 | from data_fixture.mysql_db import DB | 9 | from data_fixture.mysql_db import DB |
| 10 | import uuid | 10 | import uuid |
| 11 | 11 | ||
| 12 | db_test = DB() | ||
| 13 | 12 | ||
| 14 | #添加子账户 | 13 | #添加子账户 |
| 15 | class AddSubAccount(unittest.TestCase): | 14 | class AddSubAccount(unittest.TestCase): |
| 16 | def setUp(self): | 15 | def setUp(self): |
| 17 | self.base_url = HOST_BOSS + '/childUser/addChildUser' | 16 | self.base_url = HOST_BOSS + '/childUser/addChildUser' |
| 18 | CreateTestData.pre_AddSubAccount(Data.PARENT_ID) | 17 | CreateTestData.pre_AddSubAccount(Data.PARENT_ID) |
| 19 | 18 | ||
| 20 | def tearDown(self): | 19 | def tearDown(self): |
| 21 | print(self.result) | 20 | print(self.result) |
| 22 | 21 | ||
| 23 | def test_addSubAccount_success(self): | 22 | def test_addSubAccount_success(self): |
| 24 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} | 23 | headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': '*/*'} |
| 25 | postData = {'parentId': Data.PARENT_ID, | 24 | postData = {'parentId': Data.PARENT_ID, |
| 26 | 'image': Data.SUB_ACC_IMAGE, | 25 | 'image': Data.SUB_ACC_IMAGE, |
| 27 | 'name': '测试sub', | 26 | 'name': '测试sub', |
| 28 | 'gradeId': '6', | 27 | 'gradeId': '6', |
| 29 | 'schoolId': Data.SUB_ACC_SCHOOL_ID_1, | 28 | 'schoolId': Data.SUB_ACC_SCHOOL_ID_1, |
| 30 | 'regionId': Data.SUB_ACC_REGION_ID_1, | 29 | 'regionId': Data.SUB_ACC_REGION_ID_1, |
| 31 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 30 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 32 | 'regionName': Data.SUB_ACC_REGION_NAME_1 | 31 | 'regionName': Data.SUB_ACC_REGION_NAME_1 |
| 33 | } | 32 | } |
| 34 | r = requests.post(self.base_url, headers=headers, data=postData) | 33 | r = requests.post(self.base_url, headers=headers, data=postData) |
| 35 | self.result = r.json() | 34 | self.result = r.json() |
| 36 | self.assertEqual(db_test.select_('acornuser.child_user', {'parent_id': Data.PARENT_ID}), 1, 'addSubAccount Error') | 35 | self.assertEqual(CreateTestData.db_select('acornuser.child_user', {'parent_id': Data.PARENT_ID}), 1, 'addSubAccount Error') |
| 37 | self.assertEqual(self.result['status'], 1, 'addSubAccount Error') | 36 | self.assertEqual(self.result['status'], 1, 'addSubAccount Error') |
| 38 | 37 | ||
| 39 | 38 | ||
| 40 | #查找子账户信息 | 39 | #查找子账户信息 |
| 41 | class GetSubAccount(unittest.TestCase): | 40 | class GetSubAccount(unittest.TestCase): |
| 42 | def setUp(self): | 41 | def setUp(self): |
| 43 | self.base_url = HOST_BOSS + '/childUser/info' | 42 | self.base_url = HOST_BOSS + '/childUser/info' |
| 44 | self.subAccount_1 = str(uuid.uuid4()).replace('-', '') | 43 | self.subAccount_1 = str(uuid.uuid4()).replace('-', '') |
| 45 | self.subAccount_2 = str(uuid.uuid4()).replace('-', '') | 44 | self.subAccount_2 = str(uuid.uuid4()).replace('-', '') |
| 46 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount_1, 0) | 45 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount_1, 0) |
| 47 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount_2, 1) | 46 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount_2, 1) |
| 48 | 47 | ||
| 49 | def tearDown(self): | 48 | def tearDown(self): |
| 50 | print(self.result) | 49 | print(self.result) |
| 51 | 50 | ||
| 52 | def test_getSubAccount_success(self): | 51 | def test_getSubAccount_success(self): |
| 53 | headers = {'Accept': '*/*'} | 52 | headers = {'Accept': '*/*'} |
| 54 | getData = {'userId': Data.PARENT_ID, 'deviceNumber':Data.DEVICE_NUMBER_CUS_BIND} | 53 | getData = {'userId': Data.PARENT_ID, 'deviceNumber':Data.DEVICE_NUMBER_CUS_BIND} |
| 55 | r = requests.get(self.base_url, headers=headers, params=getData) | 54 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 56 | self.result = r.json() | 55 | self.result = r.json() |
| 57 | self.assertEqual(self.result['status'], 1, 'getSubAccount Error') | 56 | self.assertEqual(self.result['status'], 1, 'getSubAccount Error') |
| 58 | self.assertTrue(len(self.result['data']) > 1, 'getSubAccount data Error') | 57 | self.assertTrue(len(self.result['data']) > 1, 'getSubAccount data Error') |
| 59 | 58 | ||
| 60 | 59 | ||
| 61 | #删除子账户 | 60 | #删除子账户 |
| 62 | class DelSubAccount(unittest.TestCase): | 61 | class DelSubAccount(unittest.TestCase): |
| 63 | def setUp(self): | 62 | def setUp(self): |
| 64 | self.base_url = HOST_BOSS + '/childUser/delete' | 63 | self.base_url = HOST_BOSS + '/childUser/delete' |
| 65 | self.subAccount = str(uuid.uuid4()).replace('-', '') | 64 | self.subAccount = str(uuid.uuid4()).replace('-', '') |
| 66 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount, 0) | 65 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount, 0) |
| 67 | 66 | ||
| 68 | def tearDown(self): | 67 | def tearDown(self): |
| 69 | print(self.result) | 68 | print(self.result) |
| 70 | 69 | ||
| 71 | def test_delSubAccount_success(self): | 70 | def test_delSubAccount_success(self): |
| 72 | headers = {'Accept': '*/*'} | 71 | headers = {'Accept': '*/*'} |
| 73 | getData = {'subAccountId': self.subAccount} | 72 | getData = {'subAccountId': self.subAccount} |
| 74 | r = requests.get(self.base_url, headers=headers, params=getData) | 73 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 75 | self.result = r.json() | 74 | self.result = r.json() |
| 76 | self.assertEqual(db_test.select_('acornuser.child_user', {'subAccountId': self.subAccount}), 0, 'delSubAccount Error') | 75 | self.assertEqual(CreateTestData.db_select('acornuser.child_user', {'subAccountId': self.subAccount}), 0, 'delSubAccount Error') |
| 77 | self.assertEqual(self.result['status'], 1, 'delSubAccount ERROR') | 76 | self.assertEqual(self.result['status'], 1, 'delSubAccount ERROR') |
| 78 | 77 | ||
| 79 | 78 | ||
| 80 | #切换账户 | 79 | #切换账户 |
| 81 | class SwitchAccounts(unittest.TestCase): | 80 | class SwitchAccounts(unittest.TestCase): |
| 82 | def setUp(self): | 81 | def setUp(self): |
| 83 | self.base_url = HOST_BOSS + '/childUser/update' | 82 | self.base_url = HOST_BOSS + '/childUser/update' |
| 84 | self.subAccount = str(uuid.uuid4()).replace('-', '') | 83 | self.subAccount = str(uuid.uuid4()).replace('-', '') |
| 85 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount, 0) | 84 | CreateTestData.pre_subAccount(Data.PARENT_ID, self.subAccount, 0) |
| 86 | 85 | ||
| 87 | def tearDown(self): | 86 | def tearDown(self): |
| 88 | print(self.result) | 87 | print(self.result) |
| 89 | 88 | ||
| 90 | def test_swichToSubAccount_success(self): | 89 | def test_swichToSubAccount_success(self): |
| 91 | headers = {'Accept': '*/*'} | 90 | headers = {'Accept': '*/*'} |
| 92 | getData = {'subAccountId': self.subAccount, | 91 | getData = {'subAccountId': self.subAccount, |
| 93 | 'userId': Data.PARENT_ID, | 92 | 'userId': Data.PARENT_ID, |
| 94 | 'deviceNumber' : Data.DEVICE_NUMBER_CUS_BIND, | 93 | 'deviceNumber' : Data.DEVICE_NUMBER_CUS_BIND, |
| 95 | 'type': 2} | 94 | 'type': 2} |
| 96 | r = requests.get(self.base_url, headers=headers, params=getData) | 95 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 97 | self.result = r.json() | 96 | self.result = r.json() |
| 98 | where_data = {'parent_id': Data.PARENT_ID,'subAccountId': self.subAccount, 'status':1} | 97 | where_data = {'parent_id': Data.PARENT_ID,'subAccountId': self.subAccount, 'status':1} |
| 99 | self.assertEqual(db_test.select_('acornuser.child_user', where_data), 1, 'swichToSubAccount Error') | 98 | self.assertEqual(CreateTestData.db_select('acornuser.child_user', where_data), 1, 'swichToSubAccount Error') |
| 100 | self.assertEqual(self.result['status'], 1, 'swichToSubAccount ERROR') | 99 | self.assertEqual(self.result['status'], 1, 'swichToSubAccount ERROR') |
| 101 | 100 | ||
| 102 | def test_swichToParentAccount_success(self): | 101 | def test_swichToParentAccount_success(self): |
| 103 | headers = {'Accept': '*/*'} | 102 | headers = {'Accept': '*/*'} |
| 104 | getData = {'userId': Data.PARENT_ID, | 103 | getData = {'userId': Data.PARENT_ID, |
| 105 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 104 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 106 | 'type': 1} | 105 | 'type': 1} |
| 107 | r = requests.get(self.base_url, headers=headers, params=getData) | 106 | r = requests.get(self.base_url, headers=headers, params=getData) |
| 108 | self.result = r.json() | 107 | self.result = r.json() |
| 109 | where_data = {'userId': Data.PARENT_ID, | 108 | where_data = {'userId': Data.PARENT_ID, |
| 110 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, | 109 | 'deviceNumber': Data.DEVICE_NUMBER_CUS_BIND, |
| 111 | 'status': 1} | 110 | 'status': 1} |
| 112 | self.assertEqual(db_test.select_('acornuser.acorn_user_status', where_data), 1, 'swichToParentAccount Error') | 111 | self.assertEqual(CreateTestData.db_select('acornuser.acorn_user_status', where_data), 1, 'swichToParentAccount Error') |
| 113 | self.assertEqual(self.result['status'], 1, 'swichToParentAccount ERROR') | 112 | self.assertEqual(self.result['status'], 1, 'swichToParentAccount ERROR') |
| 114 | 113 | ||
| 115 | 114 | ||
| 116 | 115 | ||
| 117 | 116 | ||
| 118 | 117 | ||
| 119 | 118 |
test_cases/subject_sync.py
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
| 3 | 3 | ||
| 4 | import unittest | 4 | import unittest |
| 5 | import requests | 5 | import requests |
| 6 | from data_fixture.config_data import HOST_BOSS, HOST_RES | 6 | from data_fixture.config_data import HOST_BOSS, HOST_RES |
| 7 | from data_fixture import create_testdata as CreateTestData | 7 | from data_fixture import create_testdata as CreateTestData |
| 8 | from data_fixture import config_data as Data | 8 | from data_fixture import config_data as Data |
| 9 | from data_fixture.mysql_db import DB | 9 | from data_fixture.mysql_db import DB |
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | db_test = DB() | ||
| 13 | 12 | ||
| 14 | #获取同步视频接口 | 13 | #获取同步视频接口 |
| 15 | class ClassNameVideo(unittest.TestCase): | 14 | class ClassNameVideo(unittest.TestCase): |
| 16 | def setUp(self): | 15 | def setUp(self): |
| 17 | self.base_url = HOST_RES + '/className/video' | 16 | self.base_url = HOST_RES + '/className/video' |
| 18 | 17 | ||
| 19 | def tearDown(self): | 18 | def tearDown(self): |
| 20 | pass | 19 | pass |
| 21 | 20 | ||
| 22 | def test_ClassNameVideo_success(self): | 21 | def test_ClassNameVideo_success(self): |
| 23 | getData = {'textName': '秋天的怀念', | 22 | getData = {'textName': '秋天的怀念', |
| 24 | 'press': '人民教育出版社', | 23 | 'press': '人民教育出版社', |
| 25 | 'subject': '语文', | 24 | 'subject': '语文', |
| 26 | 'gradeName': '7年级'} | 25 | 'gradeName': '7年级'} |
| 27 | r = requests.get(self.base_url, params=getData) | 26 | r = requests.get(self.base_url, params=getData) |
| 28 | self.result_1 = r.json() | 27 | self.result_1 = r.json() |
| 29 | self.assertEqual(self.result_1['status'], 1, 'test_ClassNameVideo_success Error') | 28 | self.assertEqual(self.result_1['status'], 1, 'test_ClassNameVideo_success Error') |
| 30 | 29 | ||
| 31 | def test_ClassNameVideo_noData(self): | 30 | def test_ClassNameVideo_noData(self): |
| 32 | getData = {'textName': '秋天 的怀念', | 31 | getData = {'textName': '秋天 的怀念', |
| 33 | 'press': '人民教育出版社', | 32 | 'press': '人民教育出版社', |
| 34 | 'subject': '语文', | 33 | 'subject': '语文', |
| 35 | 'gradeName': '7年级'} | 34 | 'gradeName': '7年级'} |
| 36 | r = requests.get(self.base_url, params=getData) | 35 | r = requests.get(self.base_url, params=getData) |
| 37 | self.result_2 = r.json() | 36 | self.result_2 = r.json() |
| 38 | self.assertEqual(self.result_2['status'], 1000, 'test_ClassNameVideo_noData Error') | 37 | self.assertEqual(self.result_2['status'], 1000, 'test_ClassNameVideo_noData Error') |
| 39 | 38 | ||
| 40 | 39 | ||
| 41 | #获取知识点视频 | 40 | #获取知识点视频 |
| 42 | class PointVideo(unittest.TestCase): | 41 | class PointVideo(unittest.TestCase): |
| 43 | def setUp(self): | 42 | def setUp(self): |
| 44 | self.base_url = HOST_RES + '/point/video' | 43 | self.base_url = HOST_RES + '/point/video' |
| 45 | 44 | ||
| 46 | def tearDown(self): | 45 | def tearDown(self): |
| 47 | pass | 46 | pass |
| 48 | 47 | ||
| 49 | def test_PointVideo_success(self): | 48 | def test_PointVideo_success(self): |
| 50 | getData = {'textName': '秋天的怀念', | 49 | getData = {'textName': '秋天的怀念', |
| 51 | 'press': '人民教育出版社', | 50 | 'press': '人民教育出版社', |
| 52 | 'subject': '语文', | 51 | 'subject': '语文', |
| 53 | 'gradeName': '7年级', | 52 | 'gradeName': '7年级', |
| 54 | 'point':'说明文阅读5说明文的结构||议论文的定义和分类'} | 53 | 'point':'说明文阅读5说明文的结构||议论文的定义和分类'} |
| 55 | r = requests.get(self.base_url, params=getData) | 54 | r = requests.get(self.base_url, params=getData) |
| 56 | self.result_1 = r.json() | 55 | self.result_1 = r.json() |
| 57 | self.assertEqual(self.result_1['status'], 1, 'test_PointVideo_success Error') | 56 | self.assertEqual(self.result_1['status'], 1, 'test_PointVideo_success Error') |
| 58 | 57 | ||
| 59 | def test_PointVideo_noData(self): | 58 | def test_PointVideo_noData(self): |
| 60 | getData = {'textName': '秋天的怀念', | 59 | getData = {'textName': '秋天的怀念', |
| 61 | 'press': '人民教育出版社', | 60 | 'press': '人民教育出版社', |
| 62 | 'subject': '语文', | 61 | 'subject': '语文', |
| 63 | 'gradeName': '7年级', | 62 | 'gradeName': '7年级', |
| 64 | 'point': '说明文阅读5说明文的结构'} | 63 | 'point': '说明文阅读5说明文的结构'} |
| 65 | r = requests.get(self.base_url, params=getData) | 64 | r = requests.get(self.base_url, params=getData) |
| 66 | self.result_2 = r.json() | 65 | self.result_2 = r.json() |
| 67 | self.assertEqual(self.result_2['status'], 1000, 'test_PointVideo_noData Error') | 66 | self.assertEqual(self.result_2['status'], 1000, 'test_PointVideo_noData Error') |
| 68 | 67 | ||
| 69 | 68 | ||
| 70 | #课程中心PK练习抽题接口 | 69 | #课程中心PK练习抽题接口 |
| 71 | class SubjectTest(unittest.TestCase): | 70 | class SubjectTest(unittest.TestCase): |
| 72 | def setUp(self): | 71 | def setUp(self): |
| 73 | self.base_url = HOST_BOSS + '/subject/test/' | 72 | self.base_url = HOST_BOSS + '/subject/test/' |
| 74 | 73 | ||
| 75 | def tearDown(self): | 74 | def tearDown(self): |
| 76 | pass | 75 | pass |
| 77 | 76 | ||
| 78 | def test_SubjectTest_success(self): | 77 | def test_SubjectTest_success(self): |
| 79 | getData = {'subjectName': '数学', | 78 | getData = {'subjectName': '数学', |
| 80 | 'questionPoint': '二元一次方程||二元一次方程组的解', | 79 | 'questionPoint': '二元一次方程||二元一次方程组的解', |
| 81 | 'gradeId': '10', | 80 | 'gradeId': '10', |
| 82 | 'textName': '二元一次方程组'} | 81 | 'textName': '二元一次方程组'} |
| 83 | url = self.base_url + 'math' | 82 | url = self.base_url + 'math' |
| 84 | r = requests.get(url, params=getData) | 83 | r = requests.get(url, params=getData) |
| 85 | self.result_1 = r.json() | 84 | self.result_1 = r.json() |
| 86 | self.assertEqual(self.result_1['status'], 1, 'test_SubjectTest_success Error') | 85 | self.assertEqual(self.result_1['status'], 1, 'test_SubjectTest_success Error') |
| 87 | 86 | ||
| 88 | 87 | ||
| 89 | #巩固练习抽题接口 | 88 | #巩固练习抽题接口 |
| 90 | class ConsolidationExercise(unittest.TestCase): | 89 | class ConsolidationExercise(unittest.TestCase): |
| 91 | def setUp(self): | 90 | def setUp(self): |
| 92 | self.base_url = HOST_BOSS + '/consolidation/exercise' | 91 | self.base_url = HOST_BOSS + '/consolidation/exercise' |
| 93 | 92 | ||
| 94 | def tearDown(self): | 93 | def tearDown(self): |
| 95 | pass | 94 | pass |
| 96 | 95 | ||
| 97 | def test_ConsolidationExercise_success(self): | 96 | def test_ConsolidationExercise_success(self): |
| 98 | getData = {'subjectName': '数学', | 97 | getData = {'subjectName': '数学', |
| 99 | 'gradeId': '10', | 98 | 'gradeId': '10', |
| 100 | 'secondPoint': '二元一次方程||二元一次方程组的解', | 99 | 'secondPoint': '二元一次方程||二元一次方程组的解', |
| 101 | 'textName': '二元一次方程组', | 100 | 'textName': '二元一次方程组', |
| 102 | 'difficultyLevel': '基础卷'} | 101 | 'difficultyLevel': '基础卷'} |
| 103 | r = requests.get(self.base_url, params=getData) | 102 | r = requests.get(self.base_url, params=getData) |
| 104 | self.result = r.json() | 103 | self.result = r.json() |
| 105 | self.assertEqual(self.result['status'], 1, 'test_ConsolidationExercise_success Error') | 104 | self.assertEqual(self.result['status'], 1, 'test_ConsolidationExercise_success Error') |
| 106 | self.assertTrue(len(self.result['data']) > 1) | 105 | self.assertTrue(len(self.result['data']) > 1) |
| 107 | 106 | ||
| 108 | 107 | ||
| 108 | #课程中心PK练习提交接口 | ||
| 109 | class PKSubmitCheck(unittest.TestCase): | ||
| 110 | def setUp(self): | ||
| 111 | self.base_url = HOST_BOSS + '/submit/' | ||
| 112 | |||
| 113 | def tearDown(self): | ||
| 114 | pass | ||
| 115 | |||
| 116 | def test_PKSubmitCheck_success(self): | ||
| 117 | getData = {'subjectName': '数学', | ||
| 118 | 'gradeId': '10', | ||
| 119 | 'secondPoint': '二元一次方程||二元一次方程组的解', | ||
| 120 | 'textName': '二元一次方程组', | ||
| 121 | 'difficultyLevel': '基础卷'} | ||
| 122 | r = requests.get(self.base_url, params=getData) | ||
| 123 | self.result = r.json() | ||
| 124 | self.assertEqual(self.result['status'], 1, 'test_ConsolidationExercise_success Error') | ||
| 125 | self.assertTrue(len(self.result['data']) > 1) | ||
| 109 | 126 | ||
| 110 | 127 |