def test_options_already(self): def fn(): pass options(fn) opt = options(fn) self.assertEqual(str(opt), str({'security': []})) self.assertEqual(getattr(fn, NAME), opt)
def test_options_already(self): def fn(): pass options(fn) opt = options(fn) self.assertEqual(str(opt), str({'call': {'model': DIRECT}})) self.assertEqual(getattr(fn, NAME), opt)
def test_options_already(self): def fn(): pass options(fn) opt = options(fn) self.assertEqual( str(opt), str({ 'call': {'model': DIRECT} })) self.assertEqual(getattr(fn, NAME), opt)
def test_options(self): def fn(): pass opt = options(fn) self.assertEqual( str(opt), str({ 'security': [], 'call': {'model': DIRECT} })) self.assertEqual(getattr(fn, NAME), opt)
def test_options(self): def fn(): pass opt = options(fn) self.assertEqual(str(opt), str({ 'security': [], 'call': { 'model': DIRECT } })) self.assertEqual(getattr(fn, NAME), opt)
def remote(fn): """ Minimum needed for remote invocation. """ options(fn) return fn