Esempio n. 1
0
 def test_get_bookmark_link(self):
     identifier = "identifier"
     collection = "collection"
     bookmark_link = self.vb._get_bookmark_link(self.request, identifier, collection)
     bmk_url = common.remove_trailing_version_from_href(self.request.application_url)
     expected = "/".join((bmk_url, self.project_id, collection, identifier))
     self.assertEqual(expected, bookmark_link)
Esempio n. 2
0
 def test_get_bookmark_link(self):
     identifier = "identifier"
     collection = "collection"
     bookmark_link = self.vb._get_bookmark_link(self.request, identifier,
                                                collection)
     bmk_url = common.remove_trailing_version_from_href(
         self.request.application_url)
     expected = "/".join((bmk_url, self.project_id, collection, identifier))
     self.assertEqual(expected, bookmark_link)
Esempio n. 3
0
 def test_remove_trailing_version_from_href_3(self):
     fixture = 'http://www.testsite.com/v1.1/images/v10.5'
     expected = 'http://www.testsite.com/v1.1/images'
     actual = common.remove_trailing_version_from_href(fixture)
     self.assertEqual(actual, expected)
Esempio n. 4
0
 def test_remove_trailing_version_from_href_2(self):
     fixture = 'http://www.testsite.com/compute/v1.1'
     expected = 'http://www.testsite.com/compute'
     actual = common.remove_trailing_version_from_href(fixture)
     self.assertEqual(actual, expected)
Esempio n. 5
0
 def test_remove_trailing_version_from_href_3(self):
     fixture = 'http://www.testsite.com/v1.1/images/v10.5'
     expected = 'http://www.testsite.com/v1.1/images'
     actual = common.remove_trailing_version_from_href(fixture)
     self.assertEqual(actual, expected)
Esempio n. 6
0
 def test_remove_trailing_version_from_href_2(self):
     fixture = 'http://www.testsite.com/compute/v1.1'
     expected = 'http://www.testsite.com/compute'
     actual = common.remove_trailing_version_from_href(fixture)
     self.assertEqual(actual, expected)
Esempio n. 7
0
 def test_remove_trailing_version_from_href(self):
     fixture = "http://www.testsite.com/v1.1"
     expected = "http://www.testsite.com"
     actual = common.remove_trailing_version_from_href(fixture)
     self.assertEqual(actual, expected)