def test__snapshot_to_data(self): data = snapper._snapshot_to_data(DBUS_RET['ListSnapshots'][0]) # pylint: disable=protected-access self.assertEqual(data['id'], 42) self.assertNotIn('pre', data) self.assertEqual(data['type'], 'pre') self.assertEqual(data['user'], 'root') self.assertEqual(data['timestamp'], 1457006571) self.assertEqual(data['description'], 'Some description') self.assertEqual(data['cleanup'], '') self.assertEqual(data['userdata']['userdata1'], 'userval1')
def test__snapshot_to_data(self): data = snapper._snapshot_to_data(DBUS_RET['ListSnapshots'][0]) # pylint: disable=protected-access self.assertEqual(data['id'], 42) self.assertNotIn('pre', data) self.assertEqual(data['type'], 'pre') self.assertEqual(data['user'], 'root') self.assertEqual(data['timestamp'], 1457006571) self.assertEqual(data['description'], 'Some description') self.assertEqual(data['cleanup'], '') self.assertEqual(data['userdata']['userdata1'], 'userval1')
def test__snapshot_to_data(self): data = snapper._snapshot_to_data(DBUS_RET["ListSnapshots"][0]) # pylint: disable=protected-access self.assertEqual(data["id"], 42) self.assertNotIn("pre", data) self.assertEqual(data["type"], "pre") self.assertEqual(data["user"], "root") self.assertEqual(data["timestamp"], 1457006571) self.assertEqual(data["description"], "Some description") self.assertEqual(data["cleanup"], "") self.assertEqual(data["userdata"]["userdata1"], "userval1")