Commit 76dbeeef authored by Sam Thursfield's avatar Sam Thursfield

Merge branch 'complete-python3-port' into 'master'

functional-tests: Complete port to python3

See merge request GNOME/tracker!66
parents 21592ba5 fcbceede
This diff is collapsed.
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -21,19 +21,9 @@
"""
Peculiar Sparql behavour reported in bugs
"""
from gi.repository import GLib
import sys,os
import unittest
import time
import random
import string
import datetime
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
......@@ -120,26 +110,26 @@ class TrackerStoreSparqlBugsTests (CommonTrackerStoreTest):
"""
results1 = self.tracker.query (query1)
print "1", results1
self.assertEquals (len (results1), 1)
self.assertEquals (len (results1[0]), 2)
self.assertEquals (results1[0][0], "contact:test")
self.assertEquals (results1[0][1], "98653")
print("1", results1)
self.assertEqual (len (results1), 1)
self.assertEqual (len (results1[0]), 2)
self.assertEqual (results1[0][0], "contact:test")
self.assertEqual (results1[0][1], "98653")
results2 = self.tracker.query (query2)
print "2", results2
self.assertEquals (len (results2), 1)
self.assertEquals (len (results2[0]), 2)
self.assertEquals (results2[0][0], "contact:test")
self.assertEquals (results2[0][1], "98653")
print("2", results2)
self.assertEqual (len (results2), 1)
self.assertEqual (len (results2[0]), 2)
self.assertEqual (results2[0][0], "contact:test")
self.assertEqual (results2[0][1], "98653")
results3 = self.tracker.query (query3)
print "3", results3
self.assertEquals (len (results3), 1)
self.assertEquals (len (results3[0]), 2)
self.assertEquals (results3[0][0], "contact:test")
self.assertEquals (results3[0][1], "98653")
print("3", results3)
self.assertEqual (len (results3), 1)
self.assertEqual (len (results3[0]), 2)
self.assertEqual (results3[0][0], "contact:test")
self.assertEqual (results3[0][1], "98653")
""" Clean the DB """
delete = """
......@@ -166,9 +156,9 @@ class TrackerStoreSparqlBugsTests (CommonTrackerStoreTest):
nco:fullname 'Testing bug 217636' .
}
""")
self.assertEquals (len (results), 1)
self.assertEquals (len (results[0]), 1)
self.assertEquals (results[0][0], "contact:test-nb217636")
self.assertEqual (len (results), 1)
self.assertEqual (len (results[0]), 1)
self.assertEqual (results[0][0], "contact:test-nb217636")
problematic_delete = """
DELETE { <contact:test-nb217636> ?p ?v }
......@@ -182,7 +172,7 @@ class TrackerStoreSparqlBugsTests (CommonTrackerStoreTest):
nco:fullname 'Testing bug 217636' .
}
""")
self.assertEquals (len (results_after), 0)
self.assertEqual (len (results_after), 0)
# Safe deletion
delete = """
......@@ -204,7 +194,7 @@ class TrackerStoreSparqlBugsTests (CommonTrackerStoreTest):
wrong_insert)
new_data = self.tracker.query (query)
self.assertEquals (len (original_data), len (new_data))
self.assertEqual (len (original_data), len (new_data))
# We could be more picky, but checking there are the same number of results
# is enough to verify the problem described in the bug.
......@@ -237,9 +227,9 @@ class TrackerStoreSparqlBugsTests (CommonTrackerStoreTest):
}"""
result = self.tracker.query (query)
# Only one row of results, and the 3 colums have the same value
self.assertEquals (len (result), 1)
self.assertEquals (result[0][0], result[0][1])
self.assertEquals (result[0][1], result[0][2])
self.assertEqual (len (result), 1)
self.assertEqual (result[0][0], result[0][1])
self.assertEqual (result[0][1], result[0][2])
problematic = """INSERT OR REPLACE {
<test:resource:nb281201> nie:contentLastModified '2012-10-28T12:12:12'
......@@ -249,9 +239,9 @@ class TrackerStoreSparqlBugsTests (CommonTrackerStoreTest):
result = self.tracker.query (query)
# Only one row of results, and the 3 colums have the same value
self.assertEquals (len (result), 1)
self.assertEquals (result[0][0], result[0][1])
self.assertEquals (result[0][1], result[0][2])
self.assertEqual (len (result), 1)
self.assertEqual (result[0][0], result[0][1])
self.assertEqual (result[0][1], result[0][2])
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -22,12 +22,7 @@
These tests use only the store. They insert instances with known text
and run sparql with fts functions to check the results.
"""
import unittest
import random
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
class TestFTSFunctions (CommonTrackerStoreTest):
......@@ -68,10 +63,10 @@ class TestFTSFunctions (CommonTrackerStoreTest):
"""
results = self.tracker.query (query)
self.assertEquals (len(results), 3)
self.assertEquals (results[0][0], "contact://test/fts-function/rank/1")
self.assertEquals (results[1][0], "contact://test/fts-function/rank/2")
self.assertEquals (results[2][0], "contact://test/fts-function/rank/3")
self.assertEqual (len(results), 3)
self.assertEqual (results[0][0], "contact://test/fts-function/rank/1")
self.assertEqual (results[1][0], "contact://test/fts-function/rank/2")
self.assertEqual (results[2][0], "contact://test/fts-function/rank/3")
delete_sparql = """
DELETE {
......@@ -116,10 +111,10 @@ class TestFTSFunctions (CommonTrackerStoreTest):
"""
results = self.tracker.query (query)
self.assertEquals (len(results), 3)
self.assertEquals (results[0][0], 'nco:fullname,0,nco:nickname,0')
self.assertEquals (results[1][0], 'nco:fullname,0')
self.assertEquals (results[2][0], 'nco:fullname,0,nco:nickname,0,nco:nickname,10')
self.assertEqual (len(results), 3)
self.assertEqual (results[0][0], 'nco:fullname,0,nco:nickname,0')
self.assertEqual (results[1][0], 'nco:fullname,0')
self.assertEqual (results[2][0], 'nco:fullname,0,nco:nickname,0,nco:nickname,10')
delete_sparql = """
DELETE {
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -20,12 +20,7 @@
"""
Test the GROUP_CONCAT function in Sparql. Only requires the store.
"""
import unittest
import random
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
class TestGroupConcat (CommonTrackerStoreTest):
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -20,13 +20,7 @@
"""
Test tracker:coalesce function in Sparql. Only uses the Store
"""
import unittest
import random
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
class TestCoalesce (CommonTrackerStoreTest):
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -20,12 +20,7 @@
"""
Test the distance-calculation functions in Sparql. Only requires the Store
"""
import unittest
import random
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
POINT_COORDS = [
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -20,12 +20,7 @@
"""
Tests graphs in Sparql. Only requires the store.
"""
import unittest
import random
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
class TestGraphs (CommonTrackerStoreTest):
......@@ -73,9 +68,9 @@ class TestGraphs (CommonTrackerStoreTest):
"""
results = self.tracker.query (query)
self.assertEquals (len(results), 1)
self.assertEquals (results[0][0], "contact://test/graph/1")
self.assertEquals (results[0][1], "tel:+1234567891")
self.assertEqual (len(results), 1)
self.assertEqual (results[0][0], "contact://test/graph/1")
self.assertEqual (results[0][1], "tel:+1234567891")
delete_sparql = """
DELETE {
......@@ -120,9 +115,9 @@ class TestGraphs (CommonTrackerStoreTest):
}
"""
results = self.tracker.query (query)
self.assertEquals (len(results), 1)
self.assertEquals (results[0][0], "contact://test/graph/1")
self.assertEquals (results[0][1], "graph://test/graph/0")
self.assertEqual (len(results), 1)
self.assertEqual (results[0][0], "contact://test/graph/1")
self.assertEqual (results[0][1], "graph://test/graph/0")
delete_sparql = """
DELETE {
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -20,12 +20,7 @@
"""
Replicate the behaviour of the miner inserting information in the store.
"""
import unittest
import random
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
class TestMinerInsertBehaviour (CommonTrackerStoreTest):
......@@ -65,19 +60,19 @@ class TestMinerInsertBehaviour (CommonTrackerStoreTest):
self.tracker.update (insert_sparql)
results = self.tracker.query (select_sparql)
self.assertEquals (len(results), 1)
self.assertEqual (len(results), 1)
''' Second insertion / update '''
self.tracker.update (insert_sparql)
results = self.tracker.query (select_sparql)
self.assertEquals (len(results), 1)
self.assertEqual (len(results), 1)
''' Clean up '''
self.tracker.update (delete_sparql)
results = self.tracker.query (select_sparql)
self.assertEquals (len(results), 0)
self.assertEqual (len(results), 0)
if __name__ == '__main__':
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -20,17 +20,9 @@
"""
Send concurrent inserts and queries to the daemon to check the concurrency.
"""
import sys,os
import unittest
import time
import random
import commands
import signal
from gi.repository import GObject
from gi.repository import GLib
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
AMOUNT_OF_TEST_INSTANCES = 100
......@@ -42,7 +34,7 @@ class TestConcurrentQuery (CommonTrackerStoreTest):
holding those queries
"""
def setUp (self):
self.main_loop = GObject.MainLoop ()
self.main_loop = GLib.MainLoop ()
self.mock_data_insert ()
self.finish_counter = 0
......@@ -82,12 +74,12 @@ class TestConcurrentQuery (CommonTrackerStoreTest):
error_handler=self.error_handler)
# Safeguard of 60 seconds. The last reply should quit the loop
GObject.timeout_add_seconds (60, self.timeout_cb)
GLib.timeout_add_seconds (60, self.timeout_cb)
self.main_loop.run ()
def reply_cb (self, obj, results, data):
self.finish_counter += 1
self.assertEquals (len (results), AMOUNT_OF_TEST_INSTANCES)
self.assertEqual (len (results), AMOUNT_OF_TEST_INSTANCES)
if (self.finish_counter >= AMOUNT_OF_QUERIES):
self.timeout_cb ()
......@@ -95,7 +87,7 @@ class TestConcurrentQuery (CommonTrackerStoreTest):
self.assertTrue (True)
def error_handler (self, obj, e, user_data):
print "ERROR in DBus call: %s" % e
print("ERROR in DBus call: %s" % e)
raise(e)
def timeout_cb (self):
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -22,11 +22,10 @@ Test the query while importing at the same time. This was raising
some SQLITE_MISUSED errors before.
"""
import os
from gi.repository import GObject
from gi.repository import GLib
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
class TestSqliteMisused (CommonTrackerStoreTest):
......@@ -34,14 +33,14 @@ class TestSqliteMisused (CommonTrackerStoreTest):
Send queries while importing files (in .ttl directory)
"""
def setUp (self):
self.main_loop = GObject.MainLoop ()
self.main_loop = GLib.MainLoop ()
self.files_counter = 0
def test_queries_while_import (self):
assert os.path.isdir(cfg.generated_ttl_dir())
for root, dirs, files in os.walk(cfg.generated_ttl_dir()):
for ttl_file in filter (lambda f: f.endswith (".ttl"), files):
for ttl_file in [f for f in files if f.endswith (".ttl")]:
full_path = os.path.abspath(os.path.join (root, ttl_file))
self.files_counter += 1
......@@ -51,10 +50,10 @@ class TestSqliteMisused (CommonTrackerStoreTest):
error_handler=self.loaded_failed_cb,
user_data = full_path)
GObject.timeout_add_seconds (2, self.run_a_query)
GLib.timeout_add_seconds (2, self.run_a_query)
# Safeguard of 60 seconds. The last reply should quit the loop
# It doesn't matter if we didn't import all of the files yet.
GObject.timeout_add_seconds (60, self.timeout_cb)
GLib.timeout_add_seconds (60, self.timeout_cb)
self.main_loop.run ()
def run_a_query (self):
......@@ -66,23 +65,23 @@ class TestSqliteMisused (CommonTrackerStoreTest):
return True
def reply_cb (self, obj, results, data):
print "Query replied correctly"
print("Query replied correctly")
def error_handler (self, obj, error, data):
print "ERROR in DBus call: %s" % error
print("ERROR in DBus call: %s" % error)
def loaded_success_cb (self, obj, results, user_data):
self.files_counter -= 1
if (self.files_counter == 0):
print "Last file loaded"
print("Last file loaded")
self.timeout_cb ()
print "Success loading %s" % user_data
print("Success loading %s" % user_data)
def loaded_failed_cb (self, obj, error, user_data):
raise RuntimeError("Failed loading %s: %s" % (user_data, error))
def timeout_cb (self):
print "Forced timeout after 60 sec."
print("Forced timeout after 60 sec.")
self.main_loop.quit ()
return False
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -22,11 +22,10 @@ Test the query while running BatchSparqlUpdate at the same time. This was raisin
some SQLITE_MISUSED errors before.
"""
import os
from gi.repository import GObject
from gi.repository import GLib
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
# Number of instances per batch
......@@ -39,16 +38,16 @@ class TestSqliteBatchMisused (CommonTrackerStoreTest):
to configure properly the environment
"""
def setUp (self):
self.main_loop = GObject.MainLoop ()
self.main_loop = GLib.MainLoop ()
self.batch_counter = 0
def test_queries_while_batch_insert (self):
self.assertTrue (os.path.exists (cfg.generated_ttl_dir()))
for root, dirs, files in os.walk(cfg.generated_ttl_dir()):
for ttl_file in filter (lambda f: f.endswith (".ttl"), files):
for ttl_file in [f for f in files if f.endswith (".ttl")]:
full_path = os.path.abspath(os.path.join (root, ttl_file))
print full_path
print(full_path)
counter = 0
current_batch = ""
......@@ -71,9 +70,9 @@ class TestSqliteBatchMisused (CommonTrackerStoreTest):
current_batch = ""
self.batch_counter += 1
GObject.timeout_add_seconds (2, self.run_a_query)
GLib.timeout_add_seconds (2, self.run_a_query)
# Safeguard of 60 seconds. The last reply should quit the loop
GObject.timeout_add_seconds (60, self.timeout_cb)
GLib.timeout_add_seconds (60, self.timeout_cb)
self.main_loop.run ()
def run_a_query (self):
......@@ -85,25 +84,25 @@ class TestSqliteBatchMisused (CommonTrackerStoreTest):
return True
def reply_cb (self, obj, results, data):
print "Query replied correctly"
print("Query replied correctly")
def error_handler (self, error_msg):
print "Query failed", error_msg
print("Query failed", error_msg)
raise error_msg
def batch_success_cb (self, obj, result, user_data):
self.batch_counter -= 1
if (self.batch_counter == 0):
print "Last batch was success"
print("Last batch was success")
self.timeout_cb ()
print "Success processing a batch"
print("Success processing a batch")
def batch_failed_cb (self, obj, error, user_data):
print "Failed processing a batch: %s" % error
print("Failed processing a batch: %s" % error)
raise error
def timeout_cb (self):
print "Forced timeout after 60 sec."
print("Forced timeout after 60 sec.")
self.main_loop.quit ()
return False
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -22,10 +22,7 @@ Make sure that when COMMIT returns, the data is in the DB
"""
import time
from common.utils import configuration as cfg
from common.utils.helpers import StoreHelper as StoreHelper
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
TEST_INSTANCE_PATTERN = "test://12-transactions-%d"
......@@ -45,7 +42,7 @@ class TrackerTransactionsTest (CommonTrackerStoreTest):
self.instance_counter = 0
def tearDown (self):
print "Tear down (will take some time to remove all resources)"
print("Tear down (will take some time to remove all resources)")
delete_sparql = "DELETE { ?u a rdfs:Resource } WHERE { ?u a nmo:Email} \n"
self.tracker.update (delete_sparql,
timeout=60000)
......@@ -78,12 +75,12 @@ class TrackerTransactionsTest (CommonTrackerStoreTest):
try:
results = self.tracker.count_instances ("nmo:Email")
except:
print "Timeout, probably replaying journal or something (wait 20 sec.)"
print("Timeout, probably replaying journal or something (wait 20 sec.)")
time.sleep (20)
results = self.tracker.count_instances ()
# Every iteration we are adding new instances in the store!
self.assertEquals (results, NUMBER_OF_INSTANCES * (i+1))
self.assertEqual (results, NUMBER_OF_INSTANCES * (i+1))
if __name__ == "__main__":
ut.main ()
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -22,13 +22,11 @@ Test that the threads in the daemon are working:
A very long query shouldn't block smaller queries.
"""
import os
from gi.repository import GObject
from gi.repository import GLib
import time
from common.utils import configuration as cfg
import unittest as ut
#import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
MAX_TEST_TIME = 60 # seconds to finish the tests (to avoid infinite waitings)
......@@ -45,7 +43,7 @@ class TestThreadedStore (CommonTrackerStoreTest):
Reported in bug NB#183499
"""
def setUp (self):
self.main_loop = GObject.MainLoop ()
self.main_loop = GLib.MainLoop ()
self.simple_queries_counter = AMOUNT_SIMPLE_QUERIES
self.simple_queries_answers = 0
......@@ -61,7 +59,7 @@ class TestThreadedStore (CommonTrackerStoreTest):
"012-nco_PhoneNumber.ttl",
"016-nco_ContactIM.ttl"]:
full_path = os.path.abspath(os.path.join (cfg.generated_ttl_dir(), ttl_file))
print full_path
print(full_path)
self.tracker.get_tracker_iface().Load(
'(s)', "file://" + full_path, timeout=30000)
......@@ -70,7 +68,7 @@ class TestThreadedStore (CommonTrackerStoreTest):
start = time.time ()
self.__populate_database ()
end = time.time ()
print "Loading: %.3f sec." % (end-start)
print("Loading: %.3f sec." % (end-start))
COMPLEX_QUERY = """
SELECT ?url nie:url(?photo) nco:imStatusMessage (?url)
......@@ -95,7 +93,7 @@ class TestThreadedStore (CommonTrackerStoreTest):
} ORDER BY ?relevance LIMIT 100"""
# Standard timeout
print "Send complex query"
print("Send complex query")
self.complex_start = time.time ()
self.tracker.query(
COMPLEX_QUERY, timeout=COMPLEX_QUERY_TIMEOUT,
......@@ -107,7 +105,7 @@ class TestThreadedStore (CommonTrackerStoreTest):
self.main_loop.run ()
def __simple_query (self):
print "Send simple query (%d)" % (self.simple_queries_counter)
print("Send simple query (%d)" % (self.simple_queries_counter))
SIMPLE_QUERY = "SELECT ?name WHERE { ?u a nco:PersonContact; nco:fullname ?name. }"
self.tracker.query(
SIMPLE_QUERY,
......@@ -116,29 +114,29 @@ class TestThreadedStore (CommonTrackerStoreTest):
error_handler=self.error_handler)
self.simple_queries_counter -= 1
if (self.simple_queries_counter == 0):
print "Stop sending queries (wait)"
print("Stop sending queries (wait)")
return False
return True
def reply_simple (self, obj, results, data):
print "Simple query answered"
self.assertNotEquals (len (results), 0)
print("Simple query answered")
self.assertNotEqual (len (results), 0)
self.simple_queries_answers += 1
if (self.simple_queries_answers == AMOUNT_SIMPLE_QUERIES):
print "All simple queries answered"
print("All simple queries answered")
self.main_loop.quit ()
def reply_complex (self, obj, results, data):
print "Complex query: %.3f" % (time.time () - self.complex_start)
print("Complex query: %.3f" % (time.time () - self.complex_start))
def error_handler (self, error_msg):
print "ERROR in dbus call", error_msg
print("ERROR in dbus call", error_msg)
def error_handler_complex (self, error_msg):
print "Complex query timedout in DBus (", error_msg, ")"
print("Complex query timedout in DBus (", error_msg, ")")
def __timeout_on_idle (self):
print "Timeout... asumming idle"
print("Timeout... asumming idle")
self.main_loop.quit ()
return False
......
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
#
......@@ -28,7 +28,6 @@ from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreT
from common.utils import configuration as cfg
from gi.repository import Gio
from gi.repository import GObject
from gi.repository import GLib
import time
......@@ -49,7 +48,7 @@ class TrackerStoreSignalsTests (CommonTrackerStoreTest):
def setUp (self):
self.clean_up_list = []
self.loop = GObject.MainLoop()
self.loop = GLib.MainLoop()
self.timeout_id = 0
self.bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
......@@ -92,7 +91,7 @@ class TrackerStoreSignalsTests (CommonTrackerStoreTest):
def __pretty_print_array (self, array):
for g, s, o, p in array:
uri, prop, value = self.tracker.query ("SELECT tracker:uri (%s), tracker:uri (%s), tracker:uri (%s) WHERE {}" % (s, o, p))
print " - (", "-".join ([g, uri, prop, value]), ")"
print(" - (", "-".join ([g, uri, prop, value]), ")")
def __signal_received_cb (self, connection, sender_name, object_path, interface_name, signal_name, parameters):
"""
......@@ -129,8 +128,8 @@ class TrackerStoreSignalsTests (CommonTrackerStoreTest):
self.__wait_for_signal ()
# validate results
self.assertEquals (len (self.results_deletes), 0)
self.assertEquals (len (self.results_inserts), 6)
self.assertEqual (len (self.results_deletes), 0)
self.assertEqual (len (self.results_inserts), 6)
def test_02_remove_contact (self):