예제 #1
0
def test_get_metric_names():
    httpretty.register_uri(httpretty.GET,
                           NEW_RELIC_REGEX,
                           body=METRIC_NAMES_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
    result = c.get_metric_names("foo")
    result.should.be.a('dict')
    result.should.have.key('WebTransaction')
    result['WebTransaction'].should.be.a('list')
    result['WebTransaction'].should.have.length_of(8)
예제 #2
0
def test_get_metric_names():
    httpretty.register_uri(httpretty.GET,
                           NEW_RELIC_REGEX,
                           body=METRIC_NAMES_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
    result = c.get_metric_names("foo")
    result.should.be.a('dict')
    result.should.have.key('WebTransaction')
    result['WebTransaction'].should.be.a('list')
    result['WebTransaction'].should.have.length_of(8)