@@ -0,0 +1,817 @@
+import unittest%0Aimport os, sys%0A%0Asys.path.append(os.path.join(os.path.dirname(__file__), %22..%5C%5C%22))%0A%0Afrom app import create_app, db%0Afrom app.utils import get_or_create%0Afrom app.models import User%0A%0A%0Aclass TestUtils(unittest.TestCase):%0A    def setUp(self):%0A        self.app = create_app(%22testing%22)%0A        self.app_ctx = self.app.app_context()%0A        self.app_ctx.push()%0A        db.create_all()%0A%0A    def tearDown(self):%0A        db.session.remove()%0A        db.drop_all()%0A        self.app_ctx.pop()%0A%0A    def test_get_or_create(self):%0A        user1, created1 = get_or_create(User, name=%22foo%22, social_id=%22bar%22)%0A        db.session.add(user1)%0A        db.session.commit()%0A        user2, created2 = get_or_create(User, name=%22foo%22, social_id=%22bar%22)%0A        assert created1%0A        assert not created2%0A        assert user1 == user2

Add test case for get_or_create util