Change open source unit test deps (#70167)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70167
1. Change unit test dependency to open source base class, so that this unit test can run on git oss CI
2. Remove usage of typing.Protocol, so that lower can run with Python 3.6
Test Plan:
oss CI
passed with change included in commit:
https://github.com/pytorch/pytorch/actions/runs/1597530689
see test(fx2trt)
Reviewed By: yinghai
Differential Revision: D33228894
fbshipit-source-id: ffe3d40a02a642b3b857a0605101797037a580bb