diff --git a/flangr/posts/tests.py b/flangr/posts/tests.py index 9f307a2..94ded9b 100644 --- a/flangr/posts/tests.py +++ b/flangr/posts/tests.py @@ -3,17 +3,13 @@ import os from django.test import TestCase from django.core.files import File -from django.contrib.auth import get_user_model - from .models import Post, Collection - # Create your tests here. class TestModelTests(TestCase): def setUp(self): - self.user = get_user_model().objects.create(email="someone@example.com") with open( os.path.join(os.path.dirname(__file__), "test_data", "test_img.png"), mode="rb", @@ -22,7 +18,6 @@ class TestModelTests(TestCase): img=File(f, "somefile.png"), title="Foobar", body="Some file", - user=self.user, ) def tearDown(self): @@ -32,7 +27,5 @@ class TestModelTests(TestCase): self.assertIn("Foobar", str(self.post)) def test_collection_has_sensible_str(self): - col = Collection.objects.create( - title="A collection", description="foobar", user=self.user - ) + col = Collection.objects.create(title="A collection", description="foobar") self.assertIn("A collection", str(col)) diff --git a/requirements/base.txt b/requirements/base.txt index c49991b..3e69a73 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,3 +1,2 @@ pillow django -coverage diff --git a/run_coverage b/run_coverage deleted file mode 100755 index 639fe99..0000000 --- a/run_coverage +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -PYTHONPATH=. DJANGO_SETTINGS_MODULE=config.settings.development coverage run -m django test -coverage html -xdg-open ./htmlcov/index.html