Convert scripts in tests to API2

Uncategorized