def test_valid_fields_multiple(self): result = set( api._validate_groupby_fields(['user_id', 'project_id', 'source']) ) self.assertEqual(set(['user_id', 'project_id', 'source']), result)
def test_duplicate_fields(self): result = set( api._validate_groupby_fields(['user_id', 'source', 'user_id']) ) self.assertEqual(set(['user_id', 'source']), result)
def test_duplicate_fields(self): result = set( api._validate_groupby_fields(['user_id', 'source', 'user_id'])) self.assertEqual(set(['user_id', 'source']), result)
def test_valid_field(self): result = api._validate_groupby_fields(['user_id']) self.assertEqual(['user_id'], result)
def test_valid_fields_multiple(self): result = set( api._validate_groupby_fields(['user_id', 'project_id', 'source'])) self.assertEqual(set(['user_id', 'project_id', 'source']), result)
def test_duplicate_fields(self): result = set(api._validate_groupby_fields(["user_id", "source", "user_id"])) self.assertEqual(result, set(["user_id", "source"]))
def test_valid_fields_multiple(self): result = set(api._validate_groupby_fields(["user_id", "project_id", "source"])) self.assertEqual(result, set(["user_id", "project_id", "source"]))
def test_valid_field(self): result = api._validate_groupby_fields(["user_id"]) self.assertEqual(result, ["user_id"])