Fix broken dataflow API test
@@ -57,7 +57,11 @@ class DataFlowAPITests(CairisDaemonTestCase):
def test_get_all(self):
method = 'test_get_all'
rv = self.app.get('/api/dataflows?session_id=test')
- dataflows = jsonpickle.decode(rv.data)
+ if (sys.version_info > (3,)):
+ responseData = rv.data.decode('utf-8')
+ else:
+ responseData = rv.data
+ dataflows = jsonpickle.decode(responseData)
self.assertIsNotNone(dataflows, 'No results after deserialization')
self.assertIsInstance(dataflows, dict, 'The result is not a dictionary as expected')
self.assertGreater(len(dataflows), 0, 'No dataflows in the dictionary')
