Beispiel #1
0
 def test_both_dimensions(self, mock_ci):
     """ get_img_attrs call compute with the proper geometry when it's given both dimensions """
     get_img_attrs('url', 'noaction', 10, 20)
     self.assertEqual(mock_ci.call_args[0][2], '10x20')
Beispiel #2
0
 def test_no_width(self, mock_ci):
     """ get_img_attrs calls compute with the proper geometry when it's given no width """
     get_img_attrs('url', 'noaction', height=10)
     self.assertEqual(mock_ci.call_args[0][2], 'x10')
 def test_no_width(self, mock_ci):
     """ get_img_attrs calls compute with the proper geometry when it's given no width """
     get_img_attrs("url", "noaction", height=10)
     self.assertEqual(mock_ci.call_args[0][2], "x10")
 def test_both_dimensions(self, mock_ci):
     """ get_img_attrs call compute with the proper geometry when it's given both dimensions """
     get_img_attrs("url", "noaction", 10, 20)
     self.assertEqual(mock_ci.call_args[0][2], "10x20")
Beispiel #5
0
 def test_no_height(self, mock_ci):
     """ get_img_attrs calls compute with the proper geometry when it's given no height """
     get_img_attrs('url', 'noaction', 10)
     self.assertEqual(mock_ci.call_args[0][2], '10')