def test_value(self):
     ct = get_aggregate_statistic_from_string('value')
     self.assertEqual(ct, AggregateStatistic.VALUE)
 def test_sum(self):
     ct = get_aggregate_statistic_from_string('sum')
     self.assertEqual(ct, AggregateStatistic.SUM)
 def test_text(self):
     ct = get_aggregate_statistic_from_string('text')
     self.assertEqual(ct, AggregateStatistic.TEXT)
 def test_min(self):
     ct = get_aggregate_statistic_from_string('min')
     self.assertEqual(ct, AggregateStatistic.MIN)
 def test_max(self):
     ct = get_aggregate_statistic_from_string('max')
     self.assertEqual(ct, AggregateStatistic.MAX)
 def test_c_count(self):
     ct = get_aggregate_statistic_from_string('c_count')
     self.assertEqual(ct, AggregateStatistic.C_COUNT)
 def test_none_or_empty(self):
     ct = get_aggregate_statistic_from_string(None)
     self.assertIsNone(ct)
     ct = get_aggregate_statistic_from_string('')
     self.assertIsNone(ct)
 def test_invalid(self):
     with self.assertRaises(InvalidArgument):
         get_aggregate_statistic_from_string('foo')