def test_repr(self) -> None: locale_configuration_a = LocaleConfiguration('nl-NL') sut = LocalesConfiguration([ locale_configuration_a, ]) with assert_in_scope(sut): self.assertIsInstance(repr(sut), str)
def test_getitem(self) -> None: locale_configuration_a = LocaleConfiguration('nl-NL') sut = LocalesConfiguration([ locale_configuration_a, ]) with assert_in_scope(sut): self.assertEquals(locale_configuration_a, sut['nl-NL'])
def test_contains(self) -> None: locale_configuration_a = LocaleConfiguration('nl-NL') sut = LocalesConfiguration([ locale_configuration_a, ]) with assert_in_scope(sut): self.assertIn('nl-NL', sut) self.assertNotIn('en-US', sut)
def test_getitem(self) -> None: extension_configuration_a = ExtensionConfiguration( ConfigurableExtension) sut = ExtensionsConfiguration([ extension_configuration_a, ]) with assert_in_scope(sut): self.assertEquals(extension_configuration_a, sut[ConfigurableExtension])
def test_len(self) -> None: locale_configuration_a = LocaleConfiguration('nl-NL') locale_configuration_b = LocaleConfiguration('en-US') sut = LocalesConfiguration([ locale_configuration_a, locale_configuration_b, ]) with assert_in_scope(sut): self.assertEquals(2, len(sut))
def test_len(self) -> None: extension_configuration_a = ExtensionConfiguration( ConfigurableExtension) extension_configuration_b = ExtensionConfiguration( NonConfigurableExtension) sut = ExtensionsConfiguration([ extension_configuration_a, extension_configuration_b, ]) with assert_in_scope(sut): self.assertEquals(2, len(sut))
def test_iter(self) -> None: extension_configuration_a = ExtensionConfiguration( ConfigurableExtension) extension_configuration_b = ExtensionConfiguration( NonConfigurableExtension) sut = ExtensionsConfiguration([ extension_configuration_a, extension_configuration_b, ]) with assert_in_scope(sut): self.assertCountEqual( [extension_configuration_a, extension_configuration_b], iter(sut))