Replace assert* with more suitable asserts in tests

The following replacements were done in unit tests to
 have clearer messages in case of failure:
- assertTrue(a == b or a == c) with assertIn(a, [b, c])
- assertTrue(type(a) == dict) with assertIsInstance(a, dict)
- assertTrue(type(a) == int) with assertIsInstance(a, int)

Also assertTrue with several conditions was splitted.

Change-Id: Id6e5db9ead8d8dceb9f416c1b55280855d25e604
Merge "Replace assert* with more suitable asserts in tests"