'Checks that the current state of the database matches the specified groups and
permissions.'

def check_group_permissions(self, group_permissions):

    self.check_groups(group_permissions.keys())
    for (group_name, permission_codenames) in group_permissions.items():
        self.check_permissions(group_name, permission_codenames)
