def test_unpickle_dict(self): expected = { 1: { "1ID": "A23", "Gender": "Male", "Age": 22, "Sales": 2445, "BMI": "normal", "salary": 20, "Birthday": "24/06/1995" }, 2: { "IhD": "A2f3", "Gender": "Male", "Age": 23, "Sales": 2565, "BMI": "normal", "salary": 20, "Birthday": "24/06/1995" }, 3: { "IjD": "Aa23", "Gender": "Female", "Age": 25, "Sales": 25, "BMI": "normal", "salary": 20, "Birthday": "24/06/1995" }, 4: { "IgD": "A23", "Gender": "Female", "Age": 26, "Sales": 225, "BMI": "normal", "salary": 20, "Birthday": "24/06/1995" } } pickle = Pickler.pickle_dictionary_values(expected) self.local.insert_dictionary(pickle) result = Unpickler.unpickle_dictionary(self.local.get_db()) self.assertEqual(expected, result)
def get_remote(self): unpickle = Unpickler.unpickle_dictionary(self.remote.get_db()) return unpickle
def get_local(self): unpickle = Unpickler.unpickle_dictionary(self.local.get_db()) return unpickle