Beispiel #1
0
    def test_update_passwd(self):
        """Test update_mail"""

        self.tps.clean_up()
        self.tps.add_jdoe_in_users()

        security = Security(self.settings, self.request.session, 'jdoe', '*****@*****.**', 'newpasswd', 'newpasswd')

        security.update_passwd()

        graph = 'urn:sparql:test_askomics:users'
        triple = ':jdoe :password "' + security.get_sha256_pw() + '"'
        assert self.tps.test_triple_presence(graph, triple)
        triple = ':jdoe :password "23df582b51c3482b677c8eac54872b8bd0a49bfadc853628b8b8bd4806147b54"'
        assert not self.tps.test_triple_presence(graph, triple)
Beispiel #2
0
    def test_update_passwd(self):
        """Test update_mail"""

        self.tps.clean_up()
        self.tps.add_jdoe_in_users()

        security = Security(self.settings, self.request.session, 'jdoe',
                            '*****@*****.**', 'newpasswd', 'newpasswd')

        security.update_passwd()

        graph = 'urn:sparql:test_askomics:users'
        triple = ':jdoe :password "' + security.get_sha256_pw() + '"'
        assert self.tps.test_triple_presence(graph, triple)
        triple = ':jdoe :password "23df582b51c3482b677c8eac54872b8bd0a49bfadc853628b8b8bd4806147b54"'
        assert not self.tps.test_triple_presence(graph, triple)
Beispiel #3
0
    def test_update_passwd(self):
        """Test update_mail"""

        self.tps.clean_up()
        self.tps.add_jdoe_in_users()

        security = Security(self.settings, self.request.session, 'jdoe',
                            '*****@*****.**', 'newpasswd', 'newpasswd')

        security.update_passwd()

        assert self.tps.test_row_presence('users', 'password',
                                          (security.get_sha256_pw(), ))
        assert not self.tps.test_row_presence('users', 'password', (
            '23df582b51c3482b677c8eac54872b8bd0a49bfadc853628b8b8bd4806147b54',
        ))