October 2016
Intermediate to advanced
418 pages
9h 52m
English
Now, we will write a first round of unit tests. Specifically, we will write unit tests related to the LED resources. Create a new tests subfolder within the virtual environment's root folder. Then, create a new test_hexacopter.py file within the new tests subfolder. Add the following lines that declare many import statements and the TextHexacopter class. The code file for the sample is included in the restful_python_chapter_10_02 folder:
import unittest import status import json from tornado import ioloop, escape from tornado.testing import AsyncHTTPTestCase, gen_test, gen from async_api import Application class TestHexacopter(AsyncHTTPTestCase): def get_app(self): self.app = Application(debug=False) return self.app ...