Exemplo n.º 1
0
    def test_platform_500(self):
        rd = RegistryData(
            "326dd9d7add24646a325e8eaa82125294027db2332e49c5828d96312c5d773ab",
            attrs=FIRST_IMAGE,
            collection=ImagesManager(client=self.client.api),
        )

        with self.assertRaises(InvalidArgument):
            rd.has_platform("This/is/not/a/legal/image/name")
Exemplo n.º 2
0
 def test_platform(self):
     rd = RegistryData(
         "326dd9d7add24646a325e8eaa82125294027db2332e49c5828d96312c5d773ab",
         attrs=FIRST_IMAGE,
         collection=ImagesManager(client=self.client.api),
     )
     self.assertTrue(rd.has_platform("linux/amd64/fedora"))
Exemplo n.º 3
0
    def test_platform_404(self):
        rd = RegistryData(
            "326dd9d7add24646a325e8eaa82125294027db2332e49c5828d96312c5d773ab",
            attrs=FIRST_IMAGE,
            collection=ImagesManager(client=self.client.api),
        )

        self.assertFalse(rd.has_platform({"os": "COS", "architecture": "X-MP"}))