def test_add_element_m2m_with_environment(self):
        profile = self.F.ProfileFactory.create()
        element = self.F.ElementFactory.create(name="Linux")

        # patching extra avoids need for JS to add element-m2m
        with patch(
            "moztrap.model.environments.admin.EnvironmentElementInline.extra", 1):

            form = self.get(self.add_url).forms[0]
            form["profile"] = str(profile.id)
            form["Environment_elements-0-element"] = str(element.id)
            res = form.submit()

        self.assertEqual(res.status_int, 302)

        self.assertEqual(
            profile.environments.get(
                ).elements.get().name, "Linux")
Return true for decimal digits.
dataset/ETHPy150Open mozilla/moztrap/tests/model/environments/admin/test_environment.py/EnvironmentAdminTest.test_add_element_m2m_with_environment--crossover with--dataset/ETHPy150Open AnyMesh/anyMesh-Python/example/urwid/widget.py/IntEdit.valid_char