def METHOD_NAME(self):
    url = reverse("v2:emailprovider-list")
    data = {
        "name": "Google",
        "address": "imap.google.com",
        "port": 143,
        "secured": True,
        "domains": [
            {"id": 1000,
             "name": "gmail.com"}
        ]
    }
    response = self.client.post(url, data, format="json")
    self.assertEqual(response.status_code, 201)
    self.assertTrue(
        models.EmailProviderDomain.objects.filter(name="gmail.com")
        .exists()
    )