def test02_set_cookie_prefix(self): auth = IIIFAuth() self.assertTrue( re.match(r'\d{6}_$',auth.cookie_prefix) ) auth.set_cookie_prefix() self.assertTrue( re.match(r'\d{6}_$',auth.cookie_prefix) ) auth.set_cookie_prefix('ghi') self.assertEqual( auth.cookie_prefix, 'ghi' )
def test02_set_cookie_prefix(self): """Test set_cookie_prefix.""" auth = IIIFAuth() self.assertRegexpMatches(auth.cookie_prefix, r'\d{6}_$') auth.set_cookie_prefix() self.assertRegexpMatches(auth.cookie_prefix, r'\d{6}_$') auth.set_cookie_prefix('ghi') self.assertEqual(auth.cookie_prefix, 'ghi')
def test02_set_cookie_prefix(self): """Test set_cookie_prefix.""" auth = IIIFAuth() self.assertTrue(re.match(r'\d{6}_$', auth.cookie_prefix)) auth.set_cookie_prefix() self.assertTrue(re.match(r'\d{6}_$', auth.cookie_prefix)) auth.set_cookie_prefix('ghi') self.assertEqual(auth.cookie_prefix, 'ghi')