tests: preload api files

When sanity test is not done, API files are not loaded until the
first test case is run. Hence, it is not possible to use enums, etc.
outside of a test class.
By preloading API files before running any tests, it prevents its
issue.

Type: fix
Change-Id: I8730150374e6c5f8d6933ec037811372ac2a8da0
Signed-off-by: Maxime Peim <mpeim@cisco.com>
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 6c3cd7f..d1c40a9 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -236,11 +236,8 @@
         self._expect_api_retval = self._zero
         self._expect_stack = []
 
-        # install_dir is a class attribute. We need to set it before
-        # calling the constructor.
-        VPPApiClient.apidir = config.extern_apidir + [config.vpp_install_dir]
-
         self.vpp = VPPApiClient(
+            apidir=config.extern_apidir + [config.vpp_install_dir],
             logger=test_class.logger,
             read_timeout=read_timeout,
             use_socket=True,