예제 #1
0
def test_view_applications():
    httpretty.register_uri(httpretty.GET,
                           NEW_RELIC_REGEX,
                           body=VIEW_APPLICATIONS_SAMPLE,
                           status=200)

    # When I make an API request to view applications
    c = Client(account_id="1", api_key="2")

    # Then I should receive an array of Applications
    c.view_applications().should.be.an('list')
    c.view_applications()[0].should.be.an('pyrelic.Application')
예제 #2
0
def test_view_applications():
    httpretty.register_uri(httpretty.GET, NEW_RELIC_REGEX,
                           body=VIEW_APPLICATIONS_SAMPLE,
                           status=200
                           )

    # When I make an API request to view applications
    c = Client(account_id="1", api_key="2")

    # Then I should receive an array of Applications
    c.view_applications().should.be.an('list')
    c.view_applications()[0].should.be.an('pyrelic.Application')