How to set different responses for the GET requests in Python's unit tests
<p>I need to return different desponses depending on the GET parameters via <a href="https://github.com/gabrielfalcao/HTTPretty" rel="nofollow">HTTPretty</a>:</p>

<pre><code>@httpretty.activate
def test_multiple_requests():
    httpretty.register_uri(httpretty.GET, 'https://example.com/data.xml?n=0',
                           body='0')

    httpretty.register_uri(httpretty.GET, 'https://example.com/data.xml?n=1',
                           body='1')

    r = requests.get('https://example.com/data.xml?n=0')
    print(r.text)

    r = requests.get('https://example.com/data.xml?n=1')
    print(r.text)
</code></pre>

<p>This code prints the following:</p>

<pre><code>1
0
</code></pre>

<p>Why? I thought that it should be</p>

<pre><code>0
1
</code></pre>

<p>instead.</p>