Example #1
0
    def test_new_from_something__delegates_to_new_from_file(self,
            new_from_file, new_from_url):
        new_from_url.side_effect = AssertionError('not supposed to be here')

        ImageTruck.new_from_something('/Users/andrewlorente/.bashrc')
        new_from_file.assert_called_with('/Users/andrewlorente/.bashrc')
Example #2
0
    def test_new_from_something__delegates_to_new_from_url(self,
            new_from_file, new_from_url):
        new_from_file.side_effect = AssertionError('not supposed to be here')

        ImageTruck.new_from_something('http://facebook.com')
        new_from_url.assert_called_with('http://facebook.com')