[libsecret] tests: Fix up the javascript and python tests
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsecret] tests: Fix up the javascript and python tests
- Date: Wed, 11 Dec 2013 10:00:25 +0000 (UTC)
commit d743d4dbcc2213a77efb71d7d0b0396b39540ffe
Author: Stef Walter <stefw gnome org>
Date: Wed Dec 11 10:12:23 2013 +0100
tests: Fix up the javascript and python tests
libsecret/tests/test-clear-password.js | 4 ++--
libsecret/tests/test-clear-password.py | 9 +++++----
libsecret/tests/test-lookup-password.js | 4 ++--
libsecret/tests/test-lookup-password.py | 4 ++--
libsecret/tests/test-store-password.js | 4 ++--
libsecret/tests/test-store-password.py | 2 +-
6 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/libsecret/tests/test-clear-password.js b/libsecret/tests/test-clear-password.js
index f7e0169..357cb5c 100644
--- a/libsecret/tests/test-clear-password.js
+++ b/libsecret/tests/test-clear-password.js
@@ -20,7 +20,7 @@ const assertTrue = JsUnit.assertTrue;
Mock.start("mock-service-normal.py");
-const STORE_SCHEMA = new Secret.Schema.new("org.mock.Schema",
+const STORE_SCHEMA = new Secret.Schema("org.mock.Schema",
Secret.SchemaFlags.NONE,
{
"number": Secret.SchemaAttributeType.INTEGER,
@@ -52,7 +52,7 @@ var attributes = { "number": "2", "string": "two", "even": "true" };
var password = Secret.password_lookup_sync (STORE_SCHEMA, attributes, null);
assertEquals("222", password);
-var loop = new GLib.MainLoop.new(null, false);
+var loop = new GLib.MainLoop(null, false);
Secret.password_clear (STORE_SCHEMA, attributes,
null, function(source, result) {
diff --git a/libsecret/tests/test-clear-password.py b/libsecret/tests/test-clear-password.py
index fde98b7..32276f6 100644
--- a/libsecret/tests/test-clear-password.py
+++ b/libsecret/tests/test-clear-password.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
#
# Copyright 2012 Red Hat Inc.
#
@@ -9,8 +11,7 @@
# See the included COPYING file for more information.
#
-#!/usr/bin/env python
-
+import sys
import unittest
from gi.repository import MockService as Mock
@@ -52,7 +53,7 @@ class TestRemove(unittest.TestCase):
self.assertEqual(False, deleted)
def testAsynchronous(self):
- loop = GLib.MainLoop(None, False)
+ loop = GLib.MainLoop(None)
def on_result_ready(source, result, unused):
loop.quit()
@@ -65,7 +66,7 @@ class TestRemove(unittest.TestCase):
loop.run()
def testAsyncNotFound(self):
- loop = GLib.MainLoop(None, False)
+ loop = GLib.MainLoop(None)
def on_result_ready(source, result, unused):
loop.quit()
diff --git a/libsecret/tests/test-lookup-password.js b/libsecret/tests/test-lookup-password.js
index 4c3d3b2..90cb158 100644
--- a/libsecret/tests/test-lookup-password.js
+++ b/libsecret/tests/test-lookup-password.js
@@ -20,7 +20,7 @@ const assertTrue = JsUnit.assertTrue;
Mock.start("mock-service-normal.py");
-const STORE_SCHEMA = new Secret.Schema.new("org.mock.Schema",
+const STORE_SCHEMA = new Secret.Schema("org.mock.Schema",
Secret.SchemaFlags.NONE,
{
"number": Secret.SchemaAttributeType.INTEGER,
@@ -39,7 +39,7 @@ assertEquals(null, password);
/* Asynchronous */
-var loop = new GLib.MainLoop.new(null, false);
+var loop = new GLib.MainLoop(null, false);
Secret.password_lookup (STORE_SCHEMA, { "number": "2", "string": "two" },
null, function(source, result) {
diff --git a/libsecret/tests/test-lookup-password.py b/libsecret/tests/test-lookup-password.py
index bde21a9..157b585 100644
--- a/libsecret/tests/test-lookup-password.py
+++ b/libsecret/tests/test-lookup-password.py
@@ -42,7 +42,7 @@ class TestLookup(unittest.TestCase):
self.assertEqual(None, password)
def testAsynchronous(self):
- loop = GLib.MainLoop(None, False)
+ loop = GLib.MainLoop(None)
def on_result_ready(source, result, unused):
loop.quit()
@@ -55,7 +55,7 @@ class TestLookup(unittest.TestCase):
loop.run()
def testAsyncNotFound(self):
- loop = GLib.MainLoop(None, False)
+ loop = GLib.MainLoop(None)
def on_result_ready(source, result, unused):
loop.quit()
diff --git a/libsecret/tests/test-store-password.js b/libsecret/tests/test-store-password.js
index 0d9cb1b..13725c6 100644
--- a/libsecret/tests/test-store-password.js
+++ b/libsecret/tests/test-store-password.js
@@ -20,7 +20,7 @@ const assertTrue = JsUnit.assertTrue;
Mock.start("mock-service-normal.py");
-const STORE_SCHEMA = new Secret.Schema.new("org.mock.Schema",
+const STORE_SCHEMA = new Secret.Schema("org.mock.Schema",
Secret.SchemaFlags.NONE,
{
"number": Secret.SchemaAttributeType.INTEGER,
@@ -51,7 +51,7 @@ var attributes = { "number": "888", "string": "eight", "even": "true" };
var password = Secret.password_lookup_sync (STORE_SCHEMA, attributes, null);
assertEquals(null, password);
-var loop = new GLib.MainLoop.new(null, false);
+var loop = new GLib.MainLoop(null, false);
Secret.password_store (STORE_SCHEMA, attributes, null, "The number eight", "888",
null, function(source, result) {
diff --git a/libsecret/tests/test-store-password.py b/libsecret/tests/test-store-password.py
index 6d8a4bd..8b6f86b 100644
--- a/libsecret/tests/test-store-password.py
+++ b/libsecret/tests/test-store-password.py
@@ -52,7 +52,7 @@ class TestStore(unittest.TestCase):
password = Secret.password_lookup_sync(STORE_SCHEMA, attributes, None)
self.assertEqual(None, password);
- loop = GLib.MainLoop(None, False)
+ loop = GLib.MainLoop(None)
def on_result_ready(source, result, unused):
loop.quit()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]