Dictionary creation could be rewritten as a dictionary literal.
for example:
expect_namespace = {}
expect_namespace['namespace'] = 'MyNamespace'
expect_namespace['protected'] = True
could be rewritten as
expect_namespace = {
'namespace': 'MyNamespace',
'protected': True
}
TrivialFix
Change-Id: I76265c26861916ed01cadb62e9201aa871183566