Skip to content

Instantly share code, notes, and snippets.

@jeanphix
Created October 14, 2012 14:14
Show Gist options
  • Save jeanphix/3888701 to your computer and use it in GitHub Desktop.
Save jeanphix/3888701 to your computer and use it in GitHub Desktop.
distillery use case
class GroupSet(Set):
class __distillery__:
__model__ = Group
class admin:
name = 'admin'
class UserSet(Set)
class __distillery__:
__model__ = User
class jeanphix:
username = 'jeanphix'
groups = [GroupSet.admin]
class MyTest(unittest.TestCase):
def test_has_group_admin(self):
self.assertTrue(UserSet().jeanphix.has_group("admin"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment