Commit 8616f16a authored by okhin's avatar okhin 🚴

Adding rthe few missing tests for UserProfile

parent 4a33912e
from django.contrib.auth.models import User
from django.template.defaultfilters import slugify
from userprofile.apps import UserprofileConfig
from userprofile.models import Profile
from userprofile.factories import ProfileFactory
def test_init():
assert UserprofileConfig.name == "userprofile"
def test_profile():
profile = ProfileFactory()
assert type(profile.user) == User
assert type(profile) == Profile
assert profile.slug == slugify(profile.user.username)
assert str(profile) == profile.user.username
profile.delete()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment