I am writing unit tests for methods - often manipulating DataFrames.
My data is coming from API calls and I have fallen into the trap of using the API calls within the tests - I feel like this does not accurately test the specific components as there could be a problem with the API call.
Would it be better practice to create a dummy dataframe in each test, and separately test that the API calls return DataFrames of the expected format?
It's a pain making DataFrames manually, is there a utility that can convert a DataFrame object in an active console into the code string required to build it?