Now that all the entity classes and dependent subclasses have been defined, the next question that might arise is, how can we test such structures? The answer, of course, lies in developing an appropriate unit test. As in earlier chapters, we created a directory called /path/to/repo/chapters/07/test/booksomeplace/entity that we could define the test scripts in. It would take far too much space to delineate tests for all the classes discussed in this chapter, so we will only focus on developing a test for the booksomeplace.entity.user.Customer class.
As expected, we'll begin the test script with the appropriate import statements. Note that in order to perform imports from the classes we wish to test, we need to append /repo/chapters/07/src to the system path:
# sweetscomplete.entity.user.test_entity_customer
import os,sys
sys.path.append(os.path.realpath("/repo/chapters/07/src"))
import json
import unittest
from booksomeplace.entity.base...