コード例 #1
0
ファイル: test_tagmgr.py プロジェクト: Cfhansen/Bookie
    def test_case_insensitive(self):
        """Suggestion does not care about case of the prefix."""
        # Generate demo tag into the system
        tags = [make_tag() for i in range(5)]
        [DBSession.add(t) for t in tags]

        test_str = tags[0].name[0:4].upper()
        suggestions = TagMgr.complete(test_str)
        ok_(tags[0] in suggestions,
            "The sample tag was found in the completion set")
コード例 #2
0
ファイル: test_tagmgr.py プロジェクト: xuanhan863/Bookie
    def test_case_insensitive(self):
        """Suggestion does not care about case of the prefix."""
        # Generate demo tag into the system
        tags = [make_tag() for i in range(5)]
        [DBSession.add(t) for t in tags]

        test_str = tags[0].name[0:4].upper()
        suggestions = TagMgr.complete(test_str)
        ok_(tags[0] in suggestions,
            "The sample tag was found in the completion set")
コード例 #3
0
ファイル: test_tagmgr.py プロジェクト: Cfhansen/Bookie
    def test_basic_complete(self):
        """Tags should provide completion options."""
        # Generate demo tag into the system
        tags = [make_tag() for i in range(5)]
        [DBSession.add(t) for t in tags]

        test_str = tags[0].name[0:2]
        suggestions = TagMgr.complete(test_str)

        ok_(tags[0] in suggestions,
            "The sample tag was found in the completion set")
コード例 #4
0
ファイル: test_tagmgr.py プロジェクト: xuanhan863/Bookie
    def test_basic_complete(self):
        """Tags should provide completion options."""
        # Generate demo tag into the system
        tags = [make_tag() for i in range(5)]
        [DBSession.add(t) for t in tags]

        test_str = tags[0].name[0:2]
        suggestions = TagMgr.complete(test_str)

        ok_(tags[0] in suggestions,
            "The sample tag was found in the completion set")