예제 #1
0
 def test_catalog_method_with_fake_lookup_table(self):
     lookup_table = {'A': {'B': 'C'}}
     enviro = Envirofacts()
     enviro.lookup_table = lookup_table
     a_data = enviro.catalog('A')
     self.assertEquals(a_data, {'B': 'C'})
     b_data = enviro.catalog('A', 'B')
     self.assertEquals(b_data, 'C')
예제 #2
0
 def test_catalog_method_with_fake_lookup_methods(self):
     lookup_table = {'A': {'B': 'C'}}
     lookup_methods = ['foo', 'bar', 'baz']
     enviro = Envirofacts()
     enviro.lookup_table = lookup_table
     enviro.lookup_methods = lookup_methods
     data = enviro.catalog()
     self.assertEquals(data, lookup_methods)