Simple Flask Server to create ESP WiFi Manager webpages
Install all required packages with the following command in a virtual environment to avoid any conflicts with other packages installed on your local system.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtOn Windows the package pycryptodome>=3.14.0,<4 shall be used instead of
pycrypto>=2.6.1,<3
Simulation webpages use bootstrap 3.4.
Run the simulation of the ESP WiFi Manager after activating the virtual environment of the Setup section
sh run.shOpen http://127.0.0.1:5000/{:target="_blank"} in a browser
The unittests are covering a wide range of the simulation interface and use
the nose2 package to do so.
Run unittests for all or a single class or even for a single function as shown onwards
To create the necessary coverage report directories call the
prepare_test.sh script
cd ./
# prepare coverage directories
sh prepare_test.sh
# run all unittests
nose2 --config tests/unittest.cfg -v tests
# run all unittests of the class WiFiManager
nose2 --config tests/unittest.cfg -v tests.test_wifi_manager
# run the unittest of the "load_and_connect" function of WiFiManager class
nose2 --config tests/unittest.cfg -v tests.test_wifi_manager.TestWiFiManager.test_load_and_connectTest absolute truth of the unittesting framework itself.
nose2 --config tests/unittest.cfg -v tests.test_absolute_truth.TestAbsoluteTruthTest generic helper implementation
nose2 --config tests/unittest.cfg -v tests.test_generic_helper.TestGenericHelperTest led helper implementation. Currently only
the used Neopixel part of it.
nose2 --config tests/unittest.cfg -v tests.test_led_helper.TestNeopixelUnittests of all Micropython fake modules.
Test fake machine implementations.
nose2 --config tests/unittest.cfg -v tests.test_machine.TestMachinenose2 --config tests/unittest.cfg -v tests.test_pin.TestPinnose2 --config tests/unittest.cfg -v tests.test_rtc.TestRTCTest fake neopixel implementations.
nose2 --config tests/unittest.cfg -v tests.test_neopixel.TestNeoPixelTest fake network implementations.
nose2 --config tests/unittest.cfg -v tests.test_network.TestNetworkHelperTest message implementations.
nose2 --config tests/unittest.cfg -v tests.test_message.TestMessageTest path helper implementation.
nose2 --config tests/unittest.cfg -v tests.test_path_helper.TestPathHelperTest time helper implementation.
nose2 --config tests/unittest.cfg -v tests.test_time_helper.TestTimeHelperTest wifi helper implementation.
nose2 --config tests/unittest.cfg -v tests.test_wifi_helper.TestWifiHelperTest wifi manager implementation.
nose2 --config tests/unittest.cfg -v tests.test_wifi_manager.TestWiFiManager