Change assertTrue(isinstance()) by optimal assert
Change assertTrue(isinstance()) by optimal assert

Some of tests use different method of assertTrue(isinstance(A, B)) or
assertEqual(type(A), B). The correct way is to use assertIsInstance(A,
B) provided by testtools.

Change-Id: I3424d529c568f0a9570a757cc6e85155b0645d4b
Closes-bug: #1268480

openstack/barbican,openstack/barbican