tests: Merged duplicate imports and moved to the top
tests: Removed unittest.TestCase inheritance
tests: Use pytest fixtures where possible