Example #1
0
 def test_parse_charmhub(self):
     u = URL.parse("ch:arm64/bionic/mysql-1")
     self.assertEqual(
         u,
         URL(Schema.CHARM_HUB,
             name="mysql",
             architecture="arm64",
             series="bionic",
             revision=1))
Example #2
0
 def test_parse_v1_series(self):
     u = URL.parse("cs:~fred/bionic/mysql-1")
     self.assertEqual(
         u,
         URL(Schema.CHARM_STORE,
             name="mysql",
             user="******",
             revision=1,
             series="bionic"))
Example #3
0
 def test_parse_v2_large_revision(self):
     u = URL.parse("ch:mysql-12345")
     self.assertEqual(u, URL(Schema.CHARM_HUB, name="mysql",
                             revision=12345))
Example #4
0
 def test_parse_charmstore(self):
     u = URL.parse("cs:mysql")
     self.assertEqual(u, URL(Schema.CHARM_STORE, name="mysql"))
Example #5
0
 def test_parse_charmhub_with_no_series_arch(self):
     u = URL.parse("ch:mysql")
     self.assertEqual(u, URL(Schema.CHARM_HUB, name="mysql"))
Example #6
0
 def test_parse_charmhub_with_no_series(self):
     u = URL.parse("ch:arm64/mysql")
     self.assertEqual(
         u, URL(Schema.CHARM_HUB, name="mysql", architecture="arm64"))
Example #7
0
 def test_parse_v1_large_revision(self):
     u = URL.parse("cs:~fred/mysql-12345")
     self.assertEqual(
         u,
         URL(Schema.CHARM_STORE, name="mysql", user="******", revision=12345))
Example #8
0
 def test_parse_v1_user(self):
     u = URL.parse("cs:~fred/mysql")
     self.assertEqual(u, URL(Schema.CHARM_STORE, name="mysql", user="******"))
Example #9
0
 def test_parse_local(self):
     u = URL.parse("local:mysql")
     self.assertEqual(u, URL(Schema.LOCAL, name="mysql"))
Example #10
0
 def test_parse_charmhub(self):
     u = URL.parse("ch:mysql")
     self.assertEqual(u, URL(Schema.CHARM_HUB, name="mysql"))