Esempio n. 1
0
    def test_unique_url(self):
        u = URL()
        u.url = 'http://www.test.com/'
        u.save()

        with pytest.raises(IntegrityError):
            u = URL()
            u.url = 'http://www.test.com/'
            u.save()
Esempio n. 2
0
 def test_hash(self):
     u = URL()
     u.url = 'http://www.test.com/'
     u.save()
     assert u.hash == '72f0bcee7e19e192abf3e36386ac8317'