Change functional tests to use unittest