This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd303f1
commit 8685429
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .takes import TakesMixin as Takes | ||
|
||
__all__ = ['Takes'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from __future__ import absolute_import, division, print_function, unicode_literals | ||
|
||
|
||
class TakesMixin(object): | ||
"""This mixing provides management of takes for | ||
:py:class:`~gratipay.models.team.Team` objects. | ||
""" | ||
|
||
|
||
def enable_takes(self): | ||
"""Allow this Team to issue takes. | ||
""" | ||
pass | ||
|
||
|
||
def disable_takes(self): | ||
"""Prevent this Team from issuing takes. | ||
""" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from __future__ import absolute_import, division, print_function, unicode_literals | ||
|
||
from gratipay.testing import Harness | ||
from gratipay.models.team import mixins | ||
|
||
|
||
class Tests(Harness): | ||
|
||
def test_team_object_subclasses_takes_mixin(self): | ||
enterprise = self.make_team('The Enterprise') | ||
assert isinstance(enterprise, mixins.Takes) |