def test_valid(self):
     headers = Headers(content_type="application/json")
     j = flow_export.is_json(headers, '{"name": "example", "email": "*****@*****.**"}')
     assert isinstance(j, dict)
 def test_json_type(self):
     headers = Headers(content_type="application/json")
     assert flow_export.is_json(headers, "foobar") is False
 def test_valid(self):
     headers = Headers(content_type="application/foobar")
     j = flow_export.is_json(headers, '{"name": "example", "email": "*****@*****.**"}')
     assert j is False
 def test_empty(self):
     assert flow_export.is_json(None, None) is False