def test_several(self):
     observed1 = DummyFetchedPackage("foo", "1.1")
     observed2 = DummyFetchedPackage("bar", "1.2")
     observed3 = DummyFetchedPackage("baz", "1.5")
     packages_content = get_packages_file(
         [observed1, observed2, observed3])
     parsed = parse_packages_file_content(packages_content)
     self.assertThat(parsed, MatchesSetwise(
         MatchesPackage(observed3),
         MatchesPackage(observed2),
         MatchesPackage(observed1)))
 def test_several(self):
     observed1 = DummyFetchedPackage("foo", "1.1")
     observed2 = DummyFetchedPackage("bar", "1.2")
     observed3 = DummyFetchedPackage("baz", "1.5")
     packages_content = get_packages_file([observed1, observed2, observed3])
     parsed = parse_packages_file_content(packages_content)
     self.assertThat(
         parsed,
         MatchesSetwise(MatchesPackage(observed3),
                        MatchesPackage(observed2),
                        MatchesPackage(observed1)))
 def test_one(self):
     observed = DummyFetchedPackage("foo", "1.1")
     packages_content = get_packages_file([observed])
     parsed = parse_packages_file_content(packages_content)
     self.assertThat(len(parsed), Equals(1))
     self.assertThat(parsed[0], MatchesPackage(observed))
 def test_one(self):
     observed = DummyFetchedPackage("foo", "1.1")
     packages_content = get_packages_file([observed])
     parsed = parse_packages_file_content(packages_content)
     self.assertThat(len(parsed), Equals(1))
     self.assertThat(parsed[0], MatchesPackage(observed))