Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests/training-model #6

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
updated test to use OsmUserFactory
nifedara committed Apr 2, 2024
commit 4aba08cb50827ba427a5244c84d37d1c31e89cbd
5 changes: 3 additions & 2 deletions backend/tests/test_login_model.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from django.test import TestCase
from login.models import OsmUser

from .factories import OsmUserFactory


class TestLoginModels(TestCase):

def test_OsmUser_creation(self):
osm_user = OsmUser.objects.create(username="Test User", osm_id=123456)
osm_user = OsmUserFactory()

self.assertEqual(str(osm_user), "Test User")
self.assertEqual(osm_user.osm_id, 123456)