How does bitcoin functional test framework work?
The functional tests test the RPCs. The unit tests test the C++ code directly by calling the functions.

The functional test frameworks uses a version of python-bitcoinrpc which can be found here. This library allows the test framework to call RPC commands as if they were python functions; authproxy handles the conversion to HTTP POST requests for the RPC server. So when you see lines like self.nodes[0].getblockchaininfo(), it is actually calling the getblockchaininfo command on node0. You will see many lines like this throughout the functional tests.