Пример #1
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)
Пример #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
    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)