Changed tests to pytest