コード例 #1
0
ファイル: test_blueprint.py プロジェクト: zky001/orator
    def test_index_default_names(self):
        blueprint = Blueprint('users')
        blueprint.unique(['foo', 'bar'])
        commands = blueprint.get_commands()
        self.assertEqual('users_foo_bar_unique', commands[0].index)

        blueprint = Blueprint('users')
        blueprint.index('foo')
        commands = blueprint.get_commands()
        self.assertEqual('users_foo_index', commands[0].index)
コード例 #2
0
    def test_index_default_names(self):
        blueprint = Blueprint("users")
        blueprint.unique(["foo", "bar"])
        commands = blueprint.get_commands()
        self.assertEqual("users_foo_bar_unique", commands[0].index)

        blueprint = Blueprint("users")
        blueprint.index("foo")
        commands = blueprint.get_commands()
        self.assertEqual("users_foo_index", commands[0].index)
コード例 #3
0
ファイル: test_blueprint.py プロジェクト: krupenin/orator
    def test_index_default_names(self):
        blueprint = Blueprint('users')
        blueprint.unique(['foo', 'bar'])
        commands = blueprint.get_commands()
        self.assertEqual('users_foo_bar_unique', commands[0].index)

        blueprint = Blueprint('users')
        blueprint.index('foo')
        commands = blueprint.get_commands()
        self.assertEqual('users_foo_index', commands[0].index)