예제 #1
0
    def test_url(self):
        def get(url):
            self.assertEqual(
                "https://cloud-images.ubuntu.com/query/released.latest.txt",
                url)
            return MockResponse("raring	server	release	20130824")

        _find_latest_release(MockSession(get))
예제 #2
0
 def test_finds_latest_release(self):
     with open(
             os.path.join(os.path.dirname(os.path.abspath(__file__)),
                          "data", "releases.txt")) as f:
         data = f.read()
         get = lambda url: MockResponse(data)
     self.assertEqual("raring", _find_latest_release(MockSession(get)))
예제 #3
0
 def test_finds_latest_release(self):
     with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "releases.txt")) as f:
         data = f.read()
         get = lambda url: MockResponse(data)
     self.assertEqual("raring", _find_latest_release(MockSession(get)))
예제 #4
0
    def test_url(self):
        def get(url):
            self.assertEqual("https://cloud-images.ubuntu.com/query/released.latest.txt", url)
            return MockResponse("raring	server	release	20130824")

        _find_latest_release(MockSession(get))