Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

ValueError: not enough values to unpack (expected 2, got 1) while running django tests

$
0
0

Django test throws value error every time i try to input data in the test request

req_body = {"Value1":"Value1", "Value2":"Value2"}request = self.client.get(self.getSingleData_url, data= json.dumps(req_body), content_type='application/json')

I have tried data = req_body but it returns an empty {} to the endpointComplete Value error

I have tried using, other ways to pass data, but once it is passed as json it throws Value Error


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>