requests.post.when.called_with.should.throw

Here are the examples of the python api requests.post.when.called_with.should.throw taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

Example 1

Project: moto
Source File: test_ec2_core.py
View license
@mock_ec2
def test_not_implemented_method():
    requests.post.when.called_with(
        "https://ec2.us-east-1.amazonaws.com/",
        data={'Action': ['foobar']}
    ).should.throw(NotImplementedError)

Example 2

Project: moto
Source File: test_s3.py
View license
@mock_s3
def test_key_method_not_implemented():
    requests.post.when.called_with("https://foobar.s3.amazonaws.com/foo").should.throw(NotImplementedError)

Example 3

Project: moto
Source File: test_s3bucket_path.py
View license
@mock_s3bucket_path
def test_key_method_not_implemented():
    requests.post.when.called_with("https://s3.amazonaws.com/foobar/foo").should.throw(NotImplementedError)

Example 4

Project: moto
Source File: test_sqs.py
View license
@mock_sqs
def test_sqs_method_not_implemented():
    requests.post.when.called_with("https://sqs.amazonaws.com/?Action=[foobar]").should.throw(NotImplementedError)