fixing deprecation warnings while running tests