To test user agents, you can add the header to the call to get.

```
response = self.client.get(
    reverse('home', args=[...]),
    HTTP_USER_AGENT='...')
```