예제 #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))
예제 #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"))
예제 #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))
예제 #4
0
 def test_parse_charmstore(self):
     u = URL.parse("cs:mysql")
     self.assertEqual(u, URL(Schema.CHARM_STORE, name="mysql"))
예제 #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"))
예제 #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"))
예제 #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))
예제 #8
0
 def test_parse_v1_user(self):
     u = URL.parse("cs:~fred/mysql")
     self.assertEqual(u, URL(Schema.CHARM_STORE, name="mysql", user="******"))
예제 #9
0
 def test_parse_local(self):
     u = URL.parse("local:mysql")
     self.assertEqual(u, URL(Schema.LOCAL, name="mysql"))
예제 #10
0
 def test_parse_charmhub(self):
     u = URL.parse("ch:mysql")
     self.assertEqual(u, URL(Schema.CHARM_HUB, name="mysql"))