Apply formatting

This commit is contained in:
Sonny Bakker 2024-09-09 20:35:44 +02:00
parent dfb049ae14
commit 03b5847641
7 changed files with 633 additions and 29 deletions

View file

@ -4,18 +4,17 @@ from django.db import migrations
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('accounts', '0016_alter_user_first_name'), ("accounts", "0016_alter_user_first_name"),
] ]
operations = [ operations = [
migrations.RemoveField( migrations.RemoveField(
model_name='user', model_name="user",
name='twitter_oauth_token', name="twitter_oauth_token",
), ),
migrations.RemoveField( migrations.RemoveField(
model_name='user', model_name="user",
name='twitter_oauth_token_secret', name="twitter_oauth_token_secret",
), ),
] ]

View file

@ -2,11 +2,7 @@ import React from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { import { CATEGORY_TYPE, SAVED_TYPE, SUBREDDIT } from '../../constants.js';
CATEGORY_TYPE,
SAVED_TYPE,
SUBREDDIT,
} from '../../constants.js';
import { selectPost, toggleSaved } from '../../actions/posts.js'; import { selectPost, toggleSaved } from '../../actions/posts.js';
import { formatDatetime } from '../../../../utils.js'; import { formatDatetime } from '../../../../utils.js';

File diff suppressed because one or more lines are too long

View file

@ -4,14 +4,13 @@ from django.db import migrations
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('collection', '0016_alter_collectionrule_timezone'), ("collection", "0016_alter_collectionrule_timezone"),
] ]
operations = [ operations = [
migrations.RemoveField( migrations.RemoveField(
model_name='collectionrule', model_name="collectionrule",
name='timezone', name="timezone",
), ),
] ]

View file

@ -153,7 +153,7 @@ class NestedRuleListViewTestCase(TestCase):
rule=rule, rule=rule,
publication_date=( publication_date=(
datetime(2019, 5, 20, 16, 7, 37, tzinfo=timezone.utc) datetime(2019, 5, 20, 16, 7, 37, tzinfo=timezone.utc)
) ),
), ),
FeedPostFactory( FeedPostFactory(
title="I'm the second post", title="I'm the second post",

View file

@ -231,9 +231,7 @@ class FeedCollectorTestCase(TestCase):
first_post.title, "Trump's 'genocidal taunts' will not end Iran - Zarif" first_post.title, "Trump's 'genocidal taunts' will not end Iran - Zarif"
) )
self.assertEqual( self.assertEqual(second_post.title, "Huawei's Android loss: How it affects you")
second_post.title, "Huawei's Android loss: How it affects you"
)
self.assertEqual( self.assertEqual(
third_post.title, "Birmingham head teacher threatened over LGBT lessons" third_post.title, "Birmingham head teacher threatened over LGBT lessons"

View file

@ -79,13 +79,12 @@ class RedditCollectorTestCase(TestCase):
) )
self.assertEqual( self.assertEqual(
post.publication_date, datetime(2020, 7, 11, 22, 23, 24, tzinfo=timezone.utc) post.publication_date,
datetime(2020, 7, 11, 22, 23, 24, tzinfo=timezone.utc),
) )
self.assertEqual(post.author, "HannahB888") self.assertEqual(post.author, "HannahB888")
self.assertEqual( self.assertEqual(post.title, "Drake Interplanetary Smartkey thing that I made!")
post.title, "Drake Interplanetary Smartkey thing that I made!"
)
self.assertEqual( self.assertEqual(
post.url, post.url,
"https://www.reddit.com/r/starcitizen/comments/hph00n/drake_interplanetary_smartkey_thing_that_i_made/", "https://www.reddit.com/r/starcitizen/comments/hph00n/drake_interplanetary_smartkey_thing_that_i_made/",
@ -96,7 +95,8 @@ class RedditCollectorTestCase(TestCase):
) )
self.assertEqual( self.assertEqual(
post.publication_date, datetime(2020, 7, 12, 10, 29, 10, tzinfo=timezone.utc) post.publication_date,
datetime(2020, 7, 12, 10, 29, 10, tzinfo=timezone.utc),
) )
self.assertEqual(post.author, "Sebaron") self.assertEqual(post.author, "Sebaron")