def test_exposed_methods_exists(self): """ Context must have `__all__`. """ from weblayer.method import ExposedMethodSelector class MockContext(object): a = 'method_a' c = 'method_c' self.method_selector = ExposedMethodSelector(MockContext()) self.assertTrue(self.method_selector.select_method('a') == None)
def setUp(self): """ """ from weblayer.method import ExposedMethodSelector class MockContext(object): __all__ = ['a', 'b', 'C'] a = 'method_a' c = 'method_c' self.context = MockContext() self.method_selector = ExposedMethodSelector(self.context)
def make_one(self, context): from weblayer.method import ExposedMethodSelector return ExposedMethodSelector(context)