def test_chart_data(self): self.assertDictEqual( get_awc_daily_status_data_chart('icds-cas', config={ 'month': (2017, 5, 28), 'aggregation_level': 1 }, loc_level='state'), { "location_type": "State", "chart_data": [{ "color": ChartColors.PINK, "classed": "dashed", "strokeWidth": 2, "values": [{ "y": 0, "x": 1493337600000, "all": 0 }, { "y": 0, "x": 1493424000000, "all": 0 }, { "y": 0, "x": 1493510400000, "all": 0 }, { "y": 0, "x": 1493596800000, "all": 0 }, { "y": 0, "x": 1493683200000, "all": 0 }, { "y": 0, "x": 1493769600000, "all": 0 }, { "y": 0, "x": 1493856000000, "all": 0 }, { "y": 0, "x": 1493942400000, "all": 0 }, { "y": 0, "x": 1494028800000, "all": 0 }, { "y": 0, "x": 1494115200000, "all": 0 }, { "y": 0, "x": 1494201600000, "all": 0 }, { "y": 0, "x": 1494288000000, "all": 0 }, { "y": 0, "x": 1494374400000, "all": 0 }, { "y": 0, "x": 1494460800000, "all": 0 }, { "y": 0, "x": 1494547200000, "all": 0 }, { "y": 0, "x": 1494633600000, "all": 0 }, { "y": 0, "x": 1494720000000, "all": 0 }, { "y": 0, "x": 1494806400000, "all": 0 }, { "y": 0, "x": 1494892800000, "all": 0 }, { "y": 0, "x": 1494979200000, "all": 0 }, { "y": 0, "x": 1495065600000, "all": 0 }, { "y": 0, "x": 1495152000000, "all": 0 }, { "y": 0, "x": 1495238400000, "all": 0 }, { "y": 0, "x": 1495324800000, "all": 0 }, { "y": 0, "x": 1495411200000, "all": 0 }, { "y": 0, "x": 1495497600000, "all": 0 }, { "y": 0, "x": 1495584000000, "all": 0 }, { "y": 0, "x": 1495670400000, "all": 0 }, { "y": 0, "x": 1495756800000, "all": 0 }, { "y": 0, "x": 1495843200000, "all": 0 }, { "y": 19, "x": 1495929600000, "all": 0 }], "key": "Number of AWCs launched" }, { "color": ChartColors.BLUE, "classed": "dashed", "strokeWidth": 2, "values": [{ "y": 0, "x": 1493337600000, "all": 0 }, { "y": 0, "x": 1493424000000, "all": 0 }, { "y": 0, "x": 1493510400000, "all": 0 }, { "y": 0, "x": 1493596800000, "all": 0 }, { "y": 0, "x": 1493683200000, "all": 0 }, { "y": 0, "x": 1493769600000, "all": 0 }, { "y": 0, "x": 1493856000000, "all": 0 }, { "y": 0, "x": 1493942400000, "all": 0 }, { "y": 0, "x": 1494028800000, "all": 0 }, { "y": 0, "x": 1494115200000, "all": 0 }, { "y": 0, "x": 1494201600000, "all": 0 }, { "y": 0, "x": 1494288000000, "all": 0 }, { "y": 0, "x": 1494374400000, "all": 0 }, { "y": 0, "x": 1494460800000, "all": 0 }, { "y": 0, "x": 1494547200000, "all": 0 }, { "y": 0, "x": 1494633600000, "all": 0 }, { "y": 0, "x": 1494720000000, "all": 0 }, { "y": 0, "x": 1494806400000, "all": 0 }, { "y": 0, "x": 1494892800000, "all": 0 }, { "y": 0, "x": 1494979200000, "all": 0 }, { "y": 0, "x": 1495065600000, "all": 0 }, { "y": 0, "x": 1495152000000, "all": 0 }, { "y": 0, "x": 1495238400000, "all": 0 }, { "y": 0, "x": 1495324800000, "all": 0 }, { "y": 0, "x": 1495411200000, "all": 0 }, { "y": 0, "x": 1495497600000, "all": 0 }, { "y": 0, "x": 1495584000000, "all": 0 }, { "y": 0, "x": 1495670400000, "all": 0 }, { "y": 0, "x": 1495756800000, "all": 0 }, { "y": 0, "x": 1495843200000, "all": 0 }, { "y": 0, "x": 1495929600000, "all": 0 }], "key": "Total AWCs open" }], "top_five": [{ 'loc_name': 'st1', 'value': 0 }, { 'loc_name': 'st2', 'value': 0 }], "all_locations": [{ "loc_name": "st1", "value": 0 }, { "loc_name": "st2", "value": 0 }], "bottom_five": [{ 'loc_name': 'st1', 'value': 0 }, { 'loc_name': 'st2', 'value': 0 }] })
def test_chart_data(self): self.assertDictEqual( get_awc_daily_status_data_chart( 'icds-cas', config={ 'month': (2017, 5, 28), 'aggregation_level': 1 }, loc_level='state' ), { "location_type": "State", "chart_data": [ { "color": ChartColors.PINK, "classed": "dashed", "strokeWidth": 2, "values": [ { "y": 0, "x": 1493337600000, "all": 0 }, { "y": 0, "x": 1493424000000, "all": 0 }, { "y": 0, "x": 1493510400000, "all": 0 }, { "y": 0, "x": 1493596800000, "all": 0 }, { "y": 0, "x": 1493683200000, "all": 0 }, { "y": 0, "x": 1493769600000, "all": 0 }, { "y": 0, "x": 1493856000000, "all": 0 }, { "y": 0, "x": 1493942400000, "all": 0 }, { "y": 0, "x": 1494028800000, "all": 0 }, { "y": 0, "x": 1494115200000, "all": 0 }, { "y": 0, "x": 1494201600000, "all": 0 }, { "y": 0, "x": 1494288000000, "all": 0 }, { "y": 0, "x": 1494374400000, "all": 0 }, { "y": 0, "x": 1494460800000, "all": 0 }, { "y": 0, "x": 1494547200000, "all": 0 }, { "y": 0, "x": 1494633600000, "all": 0 }, { "y": 0, "x": 1494720000000, "all": 0 }, { "y": 0, "x": 1494806400000, "all": 0 }, { "y": 0, "x": 1494892800000, "all": 0 }, { "y": 0, "x": 1494979200000, "all": 0 }, { "y": 0, "x": 1495065600000, "all": 0 }, { "y": 0, "x": 1495152000000, "all": 0 }, { "y": 0, "x": 1495238400000, "all": 0 }, { "y": 0, "x": 1495324800000, "all": 0 }, { "y": 0, "x": 1495411200000, "all": 0 }, { "y": 0, "x": 1495497600000, "all": 0 }, { "y": 0, "x": 1495584000000, "all": 0 }, { "y": 0, "x": 1495670400000, "all": 0 }, { "y": 0, "x": 1495756800000, "all": 0 }, { "y": 0, "x": 1495843200000, "all": 0 }, { "y": 21, "x": 1495929600000, "all": 0 } ], "key": "Number of AWCs launched" }, { "color": ChartColors.BLUE, "classed": "dashed", "strokeWidth": 2, "values": [ { "y": 0, "x": 1493337600000, "all": 0 }, { "y": 0, "x": 1493424000000, "all": 0 }, { "y": 0, "x": 1493510400000, "all": 0 }, { "y": 0, "x": 1493596800000, "all": 0 }, { "y": 0, "x": 1493683200000, "all": 0 }, { "y": 0, "x": 1493769600000, "all": 0 }, { "y": 0, "x": 1493856000000, "all": 0 }, { "y": 0, "x": 1493942400000, "all": 0 }, { "y": 0, "x": 1494028800000, "all": 0 }, { "y": 0, "x": 1494115200000, "all": 0 }, { "y": 0, "x": 1494201600000, "all": 0 }, { "y": 0, "x": 1494288000000, "all": 0 }, { "y": 0, "x": 1494374400000, "all": 0 }, { "y": 0, "x": 1494460800000, "all": 0 }, { "y": 0, "x": 1494547200000, "all": 0 }, { "y": 0, "x": 1494633600000, "all": 0 }, { "y": 0, "x": 1494720000000, "all": 0 }, { "y": 0, "x": 1494806400000, "all": 0 }, { "y": 0, "x": 1494892800000, "all": 0 }, { "y": 0, "x": 1494979200000, "all": 0 }, { "y": 0, "x": 1495065600000, "all": 0 }, { "y": 0, "x": 1495152000000, "all": 0 }, { "y": 0, "x": 1495238400000, "all": 0 }, { "y": 0, "x": 1495324800000, "all": 0 }, { "y": 0, "x": 1495411200000, "all": 0 }, { "y": 0, "x": 1495497600000, "all": 0 }, { "y": 0, "x": 1495584000000, "all": 0 }, { "y": 0, "x": 1495670400000, "all": 0 }, { "y": 0, "x": 1495756800000, "all": 0 }, { "y": 0, "x": 1495843200000, "all": 0 }, { "y": 0, "x": 1495929600000, "all": 0 } ], "key": "Total AWCs open" } ], "top_five": [ {'loc_name': 'st1', 'percent': 0.0}, {'loc_name': 'st2', 'percent': 0.0}, {'loc_name': 'st7', 'percent': 0.0}, ], "all_locations": [ {'loc_name': 'st1', 'percent': 0.0}, {'loc_name': 'st2', 'percent': 0.0}, {'loc_name': 'st7', 'percent': 0.0}, ], "bottom_five": [ {'loc_name': 'st1', 'percent': 0.0}, {'loc_name': 'st2', 'percent': 0.0}, {'loc_name': 'st7', 'percent': 0.0}, ] } )