コード例 #1
0
ファイル: test_image.py プロジェクト: ErinCall/catsnap
    def test_caption__defaults_to_title(self):
        session = Client().session()
        image = Image(title='the title', filename='')
        session.add(image)
        image.add_tags(['cat', 'awesome'])

        eq_(image.caption(), 'the title')
コード例 #2
0
ファイル: test_image.py プロジェクト: ErinCall/catsnap
    def test_caption__falls_back_to_tags(self):
        session = Client().session()
        image = Image(title='', filename='')
        session.add(image)
        image.add_tags(['cat', 'awesome'])

        eq_(image.caption(), 'awesome cat')
コード例 #3
0
ファイル: test_image.py プロジェクト: ErinCall/catsnap
    def test_caption__falls_back_to_filename(self):
        image = Image(title='', filename='the filename')

        eq_(image.caption(), 'the filename')
コード例 #4
0
ファイル: test_image.py プロジェクト: pythonchelle/catsnap
    def test_caption__falls_back_to_filename(self):
        session = Client().session()
        image = Image(title='', filename='the filename')

        eq_(image.caption(), 'the filename')