'Test JSON conversion when there is only one series name.'

def testSingleSeriesName(self):

    TestSeriesHelper.MySeriesHelper(server_name='us.east-1', time=159)
    TestSeriesHelper.MySeriesHelper(server_name='us.east-1', time=158)
    TestSeriesHelper.MySeriesHelper(server_name='us.east-1', time=157)
    TestSeriesHelper.MySeriesHelper(server_name='us.east-1', time=156)
    expectation = [{'points': [[159, 'us.east-1'], [158, 'us.east-1'], [157, 'us.east-1'], [156, 'us.east-1']], 'name': 'events.stats.us.east-1', 'columns': ['time', 'server_name']}]
    rcvd = TestSeriesHelper.MySeriesHelper._json_body_()
    self.assertTrue((all([(el in expectation) for el in rcvd]) and all([(el in rcvd) for el in expectation])), 'Invalid    JSON    body    of    time    series    returned    from    _json_body_    for    one    series    name:    {0}.'.format(rcvd))
    TestSeriesHelper.MySeriesHelper._reset_()
    self.assertEqual(TestSeriesHelper.MySeriesHelper._json_body_(), [], 'Resetting    helper    did    not    empty    datapoints.')
