コード例 #1
0
ファイル: test_shortener.py プロジェクト: mpirnat/chiisai
    def test_it_makes_a_hash(self):
        value = 'http://example.com'
        expected_hash = 'qbnwQzbOAYGgjndOARE7MQ'

        hashed = shortener.make_hash(value)

        assert_equals(hashed, expected_hash)
コード例 #2
0
ファイル: test_shortener.py プロジェクト: mpirnat/chiisai
    def test_it_makes_a_hash(self):
        value = 'http://example.com'
        expected_hash = 'qbnwQzbOAYGgjndOARE7MQ'

        hashed = shortener.make_hash(value)

        assert_equals(hashed, expected_hash)
コード例 #3
0
ファイル: test_shortener.py プロジェクト: mpirnat/chiisai
    def test_it_makes_a_urlsafe_hash(self):
        value = 'foobaristan'

        hashed = shortener.make_hash(value)

        assert '+' not in hashed, hashed
        assert '/' not in hashed, hashed

        assert '?' not in hashed, hashed
        assert '#' not in hashed, hashed
        assert '=' not in hashed, hashed
        assert '&' not in hashed, hashed
コード例 #4
0
ファイル: test_shortener.py プロジェクト: mpirnat/chiisai
    def test_it_makes_a_urlsafe_hash(self):
        value = 'foobaristan'

        hashed = shortener.make_hash(value)

        assert '+' not in hashed, hashed
        assert '/' not in hashed, hashed

        assert '?' not in hashed, hashed
        assert '#' not in hashed, hashed
        assert '=' not in hashed, hashed
        assert '&' not in hashed, hashed