def METHOD_NAME(style, code, expected):
    self.component.language_code_style = style
    self.component.save()
    self.assertFalse(
        self.component.translation_set.filter(language__code=code).exists(),
        msg=f"Translation with code {code} already exists",
    )
    self.reset_rate()
    self.client.post(
        reverse("new-language", kwargs=self.kw_component),
        {"lang": code},
    )
    translation = self.component.translation_set.get(language__code=code)
    self.assertEqual(translation.language_code, expected)
    translation.remove(self.user)