Пример #1
0
 def test_desktop_releasenotes_url(self, mock_reverse):
     """
     Should return the results of reverse with the correct args
     """
     release = models.ProductRelease(version="42.0", product="Firefox")
     assert release.get_absolute_url() == mock_reverse.return_value
     mock_reverse.assert_called_with("firefox.desktop.releasenotes",
                                     args=["42.0", "release"])
Пример #2
0
 def test_desktop_releasenotes_url(self, mock_reverse):
     """
     Should return the results of reverse with the correct args
     """
     release = models.ProductRelease(version='42.0', product='Firefox')
     assert release.get_absolute_url() == mock_reverse.return_value
     mock_reverse.assert_called_with('firefox.desktop.releasenotes',
                                     args=['42.0', 'release'])
Пример #3
0
 def test_aurora_android_releasenotes_url(self, mock_reverse):
     """
     Should return the results of reverse with the correct args
     """
     release = models.ProductRelease(channel="Aurora",
                                     version="42.0a2",
                                     product="Firefox for Android")
     assert release.get_absolute_url() == mock_reverse.return_value
     mock_reverse.assert_called_with("firefox.android.releasenotes",
                                     args=["42.0a2", "aurora"])
Пример #4
0
 def test_aurora_android_releasenotes_url(self, mock_reverse):
     """
     Should return the results of reverse with the correct args
     """
     release = models.ProductRelease(channel='Aurora',
                                     version='42.0a2',
                                     product='Firefox for Android')
     assert release.get_absolute_url() == mock_reverse.return_value
     mock_reverse.assert_called_with('firefox.android.releasenotes',
                                     args=['42.0a2', 'aurora'])