def test_sector_data(self):
     self.assertDictEqual(
         get_adhaar_sector_data(
             'icds-cas',
             config={
                 'month': (2017, 5, 1),
                 'state_id': 'st1',
                 'district_id': 'd1',
                 'block_id': 'b1',
                 'aggregation_level': 4
             },
             loc_level='supervisor',
             location_id='b1'
         ),
         {
             "info": "Percentage of individuals registered using "
                     "CAS whose Adhaar identification has been captured",
             "tooltips_data": {
                 "s2": {
                     "in_month": 21,
                     "all": 66
                 },
                 "s1": {
                     "in_month": 23,
                     "all": 34
                 }
             },
             "chart_data": [
                 {
                     "color": "#006fdf",
                     "classed": "dashed",
                     "strokeWidth": 2,
                     "values": [
                         [
                             "s1",
                             0.6764705882352942
                         ],
                         [
                             "s2",
                             0.3181818181818182
                         ]
                     ],
                     "key": ""
                 }
             ]
         }
     )
Beispiel #2
0
 def test_sector_data(self):
     self.assertDictEqual(
         get_adhaar_sector_data(
             'icds-cas',
             config={
                 'month': (2017, 5, 1),
                 'state_id': 'st1',
                 'district_id': 'd1',
                 'block_id': 'b1',
                 'aggregation_level': 4
             },
             loc_level='supervisor',
             location_id='b1'
         ),
         {
             "info": percent_aadhaar_seeded_beneficiaries_help_text(),
             "tooltips_data": {
                 "s2": {
                     "in_month": 51,
                     "all": 262
                 },
                 "s1": {
                     "in_month": 72,
                     "all": 139
                 }
             },
             "chart_data": [
                 {
                     "color": MapColors.BLUE,
                     "classed": "dashed",
                     "strokeWidth": 2,
                     "values": [
                         [
                             "s1",
                             0.5179856115107914
                         ],
                         [
                             "s2",
                             0.1946564885496183
                         ]
                     ],
                     "key": ""
                 }
             ]
         }
     )
Beispiel #3
0
 def test_sector_data(self):
     self.assertDictEqual(
         get_adhaar_sector_data(
             'icds-cas',
             config={
                 'month': (2017, 5, 1),
                 'state_id': 'st1',
                 'district_id': 'd1',
                 'block_id': 'b1',
                 'aggregation_level': 4
             },
             loc_level='supervisor',
             location_id='b1'
         ),
         {
             "info": percent_aadhaar_seeded_beneficiaries_help_text(),
             "tooltips_data": {
                 "s2": {
                     "in_month": 51,
                     "all": 262
                 },
                 "s1": {
                     "in_month": 72,
                     "all": 139
                 }
             },
             "chart_data": [
                 {
                     "color": MapColors.BLUE,
                     "classed": "dashed",
                     "strokeWidth": 2,
                     "values": [
                         [
                             "s1",
                             0.5179856115107914
                         ],
                         [
                             "s2",
                             0.1946564885496183
                         ]
                     ],
                     "key": ""
                 }
             ]
         }
     )
Beispiel #4
0
 def test_sector_data(self):
     self.assertDictEqual(
         get_adhaar_sector_data('icds-cas',
                                config={
                                    'month': (2017, 5, 1),
                                    'state_id': 'st1',
                                    'district_id': 'd1',
                                    'block_id': 'b1',
                                    'aggregation_level': 4
                                },
                                loc_level='supervisor',
                                location_id='b1'),
         {
             "info":
             "Percentage of individuals registered using "
             "CAS whose Aadhaar identification has been captured",
             "tooltips_data": {
                 "s2": {
                     "in_month": 50,
                     "all": 255
                 },
                 "s1": {
                     "in_month": 71,
                     "all": 134
                 }
             },
             "chart_data": [{
                 "color":
                 MapColors.BLUE,
                 "classed":
                 "dashed",
                 "strokeWidth":
                 2,
                 "values": [["s1", 0.5298507462686567],
                            ["s2", 0.19607843137254902]],
                 "key":
                 ""
             }]
         })