'If-None-Match comparisons use weak matching, so weak and strong ETags
with the same value result in a 304 response.'

def test_weak_if_none_match(self):

    self.client.defaults['HTTP_IF_NONE_MATCH'] = ETAG
    response = self.client.get('/condition/weak_etag/')
    self.assertNotModified(response)
    response = self.client.put('/condition/weak_etag/')
    self.assertEqual(response.status_code, 412)
    self.client.defaults['HTTP_IF_NONE_MATCH'] = WEAK_ETAG
    response = self.client.get('/condition/weak_etag/')
    self.assertNotModified(response)
    response = self.client.put('/condition/weak_etag/')
    self.assertEqual(response.status_code, 412)
    response = self.client.get('/condition/')
    self.assertNotModified(response)
    response = self.client.put('/condition/')
    self.assertEqual(response.status_code, 412)
