def _get_sources(): # Avoid circular import. from maasserver.bootresources import get_simplestream_endpoint endpoint = get_simplestream_endpoint() return [endpoint]
def check(response): self.assertEqual({"sources": [get_simplestream_endpoint()]}, response)
def test_new_obtains_sources_if_not_given(self): importer = RackControllersImporter.new(system_ids=[], proxy=None) self.assertThat( importer, MatchesStructure(sources=Equals([get_simplestream_endpoint()])), )