コード例 #1
0
    def test_update_password(self):
        builder = Builder.get(Builder.create('some builder', 'some password'))
        self.assertEqual(builder.password, Builder._hashed_password('some password'))
        builder.update_password('other password')
        self.assertEqual(builder.password, Builder._hashed_password('other password'))

        # Make sure it's saved
        builder = Builder.get(builder.key())
        self.assertEqual(builder.password, Builder._hashed_password('other password'))
コード例 #2
0
ファイル: models_unittest.py プロジェクト: rniwa/webkit-perf
    def test_update_password(self):
        builder = Builder.get(Builder.create('some builder', 'some password'))
        self.assertEqual(builder.password, Builder._hashed_password('some password'))
        builder.update_password('other password')
        self.assertEqual(builder.password, Builder._hashed_password('other password'))

        # Make sure it's saved
        builder = Builder.get(builder.key())
        self.assertEqual(builder.password, Builder._hashed_password('other password'))
コード例 #3
0
 def test_create(self):
     builder_key = Builder.create('some builder', 'some password')
     self.assertTrue(builder_key)
     builder = Builder.get(builder_key)
     self.assertEqual(builder.key().name(), 'some builder')
     self.assertEqual(builder.name, 'some builder')
     self.assertEqual(builder.password, Builder._hashed_password('some password'))
コード例 #4
0
ファイル: models_unittest.py プロジェクト: rniwa/webkit-perf
 def test_create(self):
     builder_key = Builder.create('some builder', 'some password')
     self.assertTrue(builder_key)
     builder = Builder.get(builder_key)
     self.assertEqual(builder.key().name(), 'some builder')
     self.assertEqual(builder.name, 'some builder')
     self.assertEqual(builder.password, Builder._hashed_password('some password'))
コード例 #5
0
 def test_hashed_password(self):
     self.assertNotEqual(Builder._hashed_password('some password'), 'some password')
     self.assertFalse('some password' in Builder._hashed_password('some password'))
     self.assertEqual(len(Builder._hashed_password('some password')), 64)
コード例 #6
0
ファイル: models_unittest.py プロジェクト: rniwa/webkit-perf
 def test_hashed_password(self):
     self.assertNotEqual(Builder._hashed_password('some password'), 'some password')
     self.assertFalse('some password' in Builder._hashed_password('some password'))
     self.assertEqual(len(Builder._hashed_password('some password')), 64)