Updates migrations
To get the app working again I ran resetdb, let it crash in initdb, then ran the migration, then re-ran initdb
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import datetime
|
||||
|
||||
from django.test import TestCase
|
||||
from fedireads import models
|
||||
from bookwyrm import models
|
||||
|
||||
|
||||
class Author(TestCase):
|
||||
|
@ -2,7 +2,7 @@ import json
|
||||
import pathlib
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import activitypub, models
|
||||
from bookwyrm import activitypub, models
|
||||
|
||||
|
||||
class Person(TestCase):
|
||||
|
@ -2,7 +2,7 @@ import json
|
||||
import pathlib
|
||||
|
||||
from django.test import TestCase
|
||||
from fedireads import activitypub, models
|
||||
from bookwyrm import activitypub, models
|
||||
|
||||
|
||||
class Quotation(TestCase):
|
||||
|
@ -1,10 +1,10 @@
|
||||
''' testing book data connectors '''
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models
|
||||
from fedireads.connectors.abstract_connector import Mapping,\
|
||||
from bookwyrm import models
|
||||
from bookwyrm.connectors.abstract_connector import Mapping,\
|
||||
update_from_mappings
|
||||
from fedireads.connectors.fedireads_connector import Connector
|
||||
from bookwyrm.connectors.bookwyrm_connector import Connector
|
||||
|
||||
|
||||
class FedireadsConnector(TestCase):
|
||||
@ -13,7 +13,7 @@ class FedireadsConnector(TestCase):
|
||||
|
||||
models.Connector.objects.create(
|
||||
identifier='example.com',
|
||||
connector_file='fedireads_connector',
|
||||
connector_file='bookwyrm_connector',
|
||||
base_url='https://example.com',
|
||||
books_url='https:/example.com',
|
||||
covers_url='https://example.com',
|
||||
|
@ -4,16 +4,16 @@ from django.test import TestCase
|
||||
import json
|
||||
import pathlib
|
||||
|
||||
from fedireads import models
|
||||
from fedireads.connectors.fedireads_connector import Connector
|
||||
from fedireads.connectors.abstract_connector import SearchResult, get_date
|
||||
from bookwyrm import models
|
||||
from bookwyrm.connectors.bookwyrm_connector import Connector
|
||||
from bookwyrm.connectors.abstract_connector import SearchResult, get_date
|
||||
|
||||
|
||||
class FedireadsConnector(TestCase):
|
||||
def setUp(self):
|
||||
models.Connector.objects.create(
|
||||
identifier='example.com',
|
||||
connector_file='fedireads_connector',
|
||||
connector_file='bookwyrm_connector',
|
||||
base_url='https://example.com',
|
||||
books_url='https://example.com',
|
||||
covers_url='https://example.com/images/covers',
|
||||
|
@ -5,11 +5,11 @@ import json
|
||||
import pathlib
|
||||
import pytz
|
||||
|
||||
from fedireads import models
|
||||
from fedireads.connectors.openlibrary import Connector
|
||||
from fedireads.connectors.openlibrary import get_languages, get_description
|
||||
from fedireads.connectors.openlibrary import pick_default_edition, get_openlibrary_key
|
||||
from fedireads.connectors.abstract_connector import SearchResult, get_date
|
||||
from bookwyrm import models
|
||||
from bookwyrm.connectors.openlibrary import Connector
|
||||
from bookwyrm.connectors.openlibrary import get_languages, get_description
|
||||
from bookwyrm.connectors.openlibrary import pick_default_edition, get_openlibrary_key
|
||||
from bookwyrm.connectors.abstract_connector import SearchResult, get_date
|
||||
|
||||
|
||||
class Openlibrary(TestCase):
|
||||
|
@ -2,9 +2,9 @@
|
||||
import datetime
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models
|
||||
from fedireads.connectors.self_connector import Connector
|
||||
from fedireads.settings import DOMAIN
|
||||
from bookwyrm import models
|
||||
from bookwyrm.connectors.self_connector import Connector
|
||||
from bookwyrm.settings import DOMAIN
|
||||
|
||||
|
||||
class SelfConnector(TestCase):
|
||||
|
@ -26,7 +26,7 @@
|
||||
"endpoints": {
|
||||
"sharedInbox": "https://example.com/inbox"
|
||||
},
|
||||
"fedireadsUser": true,
|
||||
"bookwyrmUser": true,
|
||||
"manuallyApprovesFollowers": false,
|
||||
"icon": {
|
||||
"type": "Image",
|
||||
|
@ -1,9 +1,9 @@
|
||||
''' testing models '''
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models
|
||||
from fedireads.models.base_model import FedireadsModel
|
||||
from fedireads.settings import DOMAIN
|
||||
from bookwyrm import models
|
||||
from bookwyrm.models.base_model import FedireadsModel
|
||||
from bookwyrm.settings import DOMAIN
|
||||
|
||||
|
||||
class BaseModel(TestCase):
|
||||
@ -11,7 +11,7 @@ class BaseModel(TestCase):
|
||||
instance = FedireadsModel()
|
||||
instance.id = 1
|
||||
expected = instance.get_remote_id()
|
||||
self.assertEqual(expected, 'https://%s/fedireadsmodel/1' % DOMAIN)
|
||||
self.assertEqual(expected, 'https://%s/bookwyrmmodel/1' % DOMAIN)
|
||||
|
||||
def test_remote_id_with_user(self):
|
||||
user = models.User.objects.create_user(
|
||||
@ -22,4 +22,4 @@ class BaseModel(TestCase):
|
||||
expected = instance.get_remote_id()
|
||||
self.assertEqual(
|
||||
expected,
|
||||
'https://%s/user/mouse/fedireadsmodel/1' % DOMAIN)
|
||||
'https://%s/user/mouse/bookwyrmmodel/1' % DOMAIN)
|
||||
|
@ -1,7 +1,7 @@
|
||||
''' testing models '''
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models, settings
|
||||
from bookwyrm import models, settings
|
||||
|
||||
|
||||
class Book(TestCase):
|
||||
|
@ -2,7 +2,7 @@
|
||||
import datetime
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models
|
||||
from bookwyrm import models
|
||||
|
||||
|
||||
class ImportJob(TestCase):
|
||||
|
@ -1,7 +1,7 @@
|
||||
''' testing models '''
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models, settings
|
||||
from bookwyrm import models, settings
|
||||
|
||||
|
||||
class Status(TestCase):
|
||||
|
@ -1,8 +1,8 @@
|
||||
''' testing models '''
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models
|
||||
from fedireads.settings import DOMAIN
|
||||
from bookwyrm import models
|
||||
from bookwyrm.settings import DOMAIN
|
||||
|
||||
|
||||
class User(TestCase):
|
||||
|
@ -1,7 +1,7 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models
|
||||
from fedireads import status as status_builder
|
||||
from bookwyrm import models
|
||||
from bookwyrm import status as status_builder
|
||||
|
||||
|
||||
class Comment(TestCase):
|
||||
|
@ -2,8 +2,8 @@ from django.test import TestCase
|
||||
import json
|
||||
import pathlib
|
||||
|
||||
from fedireads import activitypub, models
|
||||
from fedireads import status as status_builder
|
||||
from bookwyrm import activitypub, models
|
||||
from bookwyrm import status as status_builder
|
||||
|
||||
|
||||
class Quotation(TestCase):
|
||||
|
@ -1,7 +1,7 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models
|
||||
from fedireads import status as status_builder
|
||||
from bookwyrm import models
|
||||
from bookwyrm import status as status_builder
|
||||
|
||||
|
||||
class Review(TestCase):
|
||||
|
@ -1,7 +1,7 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models
|
||||
from fedireads import status as status_builder
|
||||
from bookwyrm import models
|
||||
from bookwyrm import status as status_builder
|
||||
|
||||
|
||||
class Status(TestCase):
|
||||
|
@ -1,8 +1,8 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import books_manager, models
|
||||
from fedireads.connectors.fedireads_connector import Connector
|
||||
from fedireads.settings import DOMAIN
|
||||
from bookwyrm import books_manager, models
|
||||
from bookwyrm.connectors.bookwyrm_connector import Connector
|
||||
from bookwyrm.settings import DOMAIN
|
||||
|
||||
|
||||
class Book(TestCase):
|
||||
|
@ -1,7 +1,7 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models, broadcast
|
||||
from fedireads.settings import DOMAIN
|
||||
from bookwyrm import models, broadcast
|
||||
from bookwyrm.settings import DOMAIN
|
||||
|
||||
|
||||
class Book(TestCase):
|
||||
@ -31,7 +31,7 @@ class Book(TestCase):
|
||||
outbox='http://example2.com/u/3/o',
|
||||
inbox='http://example2.com/u/3/inbox',
|
||||
shared_inbox='http://example2.com/inbox',
|
||||
fedireads_user=False, local=False)
|
||||
bookwyrm_user=False, local=False)
|
||||
self.user.followers.add(non_fr_follower)
|
||||
|
||||
local_follower = models.User.objects.create_user(
|
||||
@ -64,7 +64,7 @@ class Book(TestCase):
|
||||
'http://example.com/u/2/inbox',
|
||||
]
|
||||
|
||||
recipients = broadcast.get_public_recipients(self.user, software='fedireads')
|
||||
recipients = broadcast.get_public_recipients(self.user, software='bookwyrm')
|
||||
self.assertEqual(recipients, expected)
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@ import json
|
||||
import pathlib
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models, incoming
|
||||
from bookwyrm import models, incoming
|
||||
|
||||
|
||||
class Favorite(TestCase):
|
||||
|
@ -2,7 +2,7 @@ import json
|
||||
import pathlib
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads import models, remote_user
|
||||
from bookwyrm import models, remote_user
|
||||
|
||||
|
||||
class RemoteUser(TestCase):
|
||||
@ -42,7 +42,7 @@ class RemoteUser(TestCase):
|
||||
self.user_data['publicKey']['publicKeyPem']
|
||||
)
|
||||
self.assertEqual(user.local, False)
|
||||
self.assertEqual(user.fedireads_user, True)
|
||||
self.assertEqual(user.bookwyrm_user, True)
|
||||
self.assertEqual(user.manually_approves_followers, False)
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from fedireads.sanitize_html import InputHtmlParser
|
||||
from bookwyrm.sanitize_html import InputHtmlParser
|
||||
|
||||
|
||||
class Sanitizer(TestCase):
|
||||
|
@ -9,10 +9,10 @@ import responses
|
||||
from django.test import TestCase, Client
|
||||
from django.utils.http import http_date
|
||||
|
||||
from fedireads.models import User
|
||||
from fedireads.activitypub import Follow
|
||||
from fedireads.settings import DOMAIN
|
||||
from fedireads.signatures import create_key_pair, make_signature, make_digest
|
||||
from bookwyrm.models import User
|
||||
from bookwyrm.activitypub import Follow
|
||||
from bookwyrm.settings import DOMAIN
|
||||
from bookwyrm.signatures import create_key_pair, make_signature, make_digest
|
||||
|
||||
def get_follow_data(follower, followee):
|
||||
follow_activity = Follow(
|
||||
|
Reference in New Issue
Block a user