diff --git a/concerned_testrunner.py b/concerned_testrunner.py new file mode 100644 index 0000000..7b4594f --- /dev/null +++ b/concerned_testrunner.py @@ -0,0 +1,11 @@ +import unittest + +from django.test.runner import DiscoverRunner + + +class ConcernedTestLoader(unittest.TestLoader): + testMethodPrefix = "concerning" + + +class ConcernedTestRunner(DiscoverRunner): + test_loader = ConcernedTestLoader() diff --git a/core/tests/color_tests.py b/core/tests/color_tests.py index b7618c5..0259646 100644 --- a/core/tests/color_tests.py +++ b/core/tests/color_tests.py @@ -6,23 +6,23 @@ class ColorTestCase(TestCase): - def test_can_diffract(self): + def concerning_diffraction(self): self.assertEqual([127, 2, 255], diffract("7f02ff")) - def test_can_undiffract(self): + def concerning_undiffraction(self): self.assertEqual("7f02ff", undiffract([127, 2, 255])) - def test_can_interpolate(self): + def concerning_interpolation(self): self.assertEqual([127, 127, 127], interpolate([0, 0, 0], [254, 254, 254], 0.5)) - def test_can_interpolate_stop(self): + def concerning_stop_interpolation(self): self.assertEqual("7f7f7f", interpolate_stop({1: "000000", 3: "fefefe"}, 2)) class StyleTestCase(TestCase): - def test_can_populate_stops(self): + def concerning_stop_population(self): self.assertEqual( {-4: 'ff0000', -3: 'df001f', -2: 'bf003f', -1: '9f005f', 0: '7f007f', 1: '5f009f', 2: '3f00bf', 3: '1f00df', 4: '0000ff'}, diff --git a/core/tests/view_tests.py b/core/tests/view_tests.py index 7ad7756..d628a39 100644 --- a/core/tests/view_tests.py +++ b/core/tests/view_tests.py @@ -10,7 +10,7 @@ class SignupTestCase(TestCase): - def test_can_sign_up(self): + def concerning_signup(self): response = self.client.post( reverse('sign_up'), {'username': "signup_testr", @@ -23,7 +23,7 @@ def test_can_sign_up(self): self.assertTrue(user_queryset.exists()) self.assertTrue(user_queryset[0].check_password("moeDukr(,rpdCesLlrq")) - def test_cannnot_claim_extant_username(self): + def concerning_the_inability_to_claim_extant_usernames(self): f.FinetoothUserFactory.create(username="username_squatter") response = self.client.post( reverse('sign_up'), @@ -36,7 +36,7 @@ def test_cannnot_claim_extant_username(self): self.assertIn(b"A user with that username already exists.", response.content) - def test_confirm_password_must_match(self): + def concerning_confirm_passwords_needing_to_match(self): prior_user_count = FinetoothUser.objects.count() response = self.client.post( reverse('sign_up'), @@ -50,7 +50,7 @@ def test_confirm_password_must_match(self): self.assertEqual(prior_user_count, post_user_count) self.assertEqual(422, response.status_code) - def test_required_fields(self): + def concerning_required_fields(self): prior_user_count = FinetoothUser.objects.count() response = self.client.post( reverse('sign_up'), @@ -81,13 +81,13 @@ def setUp(self): username=self.the_user.username, password=f.FACTORY_USER_PASSWORD ) - def test_user_can_tag_own_post(self): + def concerning_users_tagging_their_own_posts(self): self.client.post(reverse('tag', args=(self.the_post.pk,)), {'label': "taggable"}) tags = self.the_post.tag_set self.assertTrue("taggable", tags.filter(label="taggable").exists()) - def test_user_cannot_tag_post_of_other(self): + def concerning_users_inability_to_tag_posts_of_others(self): response = self.client.post( reverse('tag', args=(self.other_post.pk,)), {'label': "untaggable"} @@ -96,7 +96,7 @@ def test_user_cannot_tag_post_of_other(self): tags = self.other_post.tag_set self.assertEqual(0, tags.count()) - def test_user_cannot_double_apply_same_tag(self): + def concerning_prohibition_of_double_tagging(self): tags_before = self.the_post.tag_set.all() response = self.client.post( reverse('tag', args=(self.the_post.pk,)), @@ -115,7 +115,7 @@ def setUpTestData(cls): cls.the_user = f.FinetoothUserFactory.create() cls.the_post = f.PostFactory.create() - def test_can_submit_comment(self): + def concerning_comment_submission(self): self.client.login( username=self.the_user.username, password=f.FACTORY_USER_PASSWORD ) @@ -135,7 +135,7 @@ def test_can_submit_comment(self): ) + fragment_identifier ) - def test_against_html_injection(self): + def concerning_html_injection(self): self.client.login( username=self.the_user.username, password=f.FACTORY_USER_PASSWORD ) @@ -146,7 +146,7 @@ def test_against_html_injection(self): comment = self.the_post.comment_set.filter(commenter=self.the_user)[0] self.assertNotIn("