
from flask.ext.login import current_user


def create(user=None):
    if current_user.is_authenticated():
        if current_user.admin:
            return True
        else:
            return False
    else:
        return False


def read(user=None):
    return True


def update(user):
    return create(user)


def delete(user):
    return update(user)


from flask.ext.login import current_user


def create(user=None): # pragma: no cover
    if current_user.is_authenticated():
        if current_user.admin:
            return True
        else:
            return False
    else:
        return False


def read(user=None): # pragma: no cover
    return True


def update(user): # pragma: no cover
    return create(user)


def delete(user): # pragma: no cover
    return update(user)

Exclude it from coverage as these permissions are not used yet.
Exclude it from coverage as these permissions are not used yet.

  
  from flask.ext.login import current_user
  
  
- def create(user=None):
+ def create(user=None): # pragma: no cover
      if current_user.is_authenticated():
          if current_user.admin:
              return True
          else:
              return False
      else:
          return False
  
  
- def read(user=None):
+ def read(user=None): # pragma: no cover
      return True
  
  
- def update(user):
+ def update(user): # pragma: no cover
      return create(user)
  
  
- def delete(user):
+ def delete(user): # pragma: no cover
      return update(user)
  
Exclude it from coverage as these permissions are not used yet.
## Code Before:

from flask.ext.login import current_user


def create(user=None):
    if current_user.is_authenticated():
        if current_user.admin:
            return True
        else:
            return False
    else:
        return False


def read(user=None):
    return True


def update(user):
    return create(user)


def delete(user):
    return update(user)

## Instruction:
Exclude it from coverage as these permissions are not used yet.
## Code After:

from flask.ext.login import current_user


def create(user=None): # pragma: no cover
    if current_user.is_authenticated():
        if current_user.admin:
            return True
        else:
            return False
    else:
        return False


def read(user=None): # pragma: no cover
    return True


def update(user): # pragma: no cover
    return create(user)


def delete(user): # pragma: no cover
    return update(user)
