Adding testing code the functional_test.py