mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
Removes tests of deleted code
This commit is contained in:
parent
5a09ce68ec
commit
c43c566783
5 changed files with 0 additions and 110 deletions
|
@ -1 +0,0 @@
|
|||
from . import *
|
|
@ -1,18 +0,0 @@
|
|||
from django.test import TestCase
|
||||
|
||||
from bookwyrm import models
|
||||
from bookwyrm import status as status_builder
|
||||
|
||||
|
||||
class Comment(TestCase):
|
||||
''' we have hecka ways to create statuses '''
|
||||
def setUp(self):
|
||||
self.user = models.User.objects.create_user(
|
||||
'mouse', 'mouse@mouse.mouse', 'mouseword')
|
||||
self.book = models.Edition.objects.create(title='Example Edition')
|
||||
|
||||
|
||||
def test_create_comment(self):
|
||||
comment = status_builder.create_comment(
|
||||
self.user, self.book, 'commentary')
|
||||
self.assertEqual(comment.content, 'commentary')
|
|
@ -1,24 +0,0 @@
|
|||
from django.test import TestCase
|
||||
|
||||
from bookwyrm import models
|
||||
from bookwyrm import status as status_builder
|
||||
|
||||
|
||||
class Quotation(TestCase):
|
||||
''' we have hecka ways to create statuses '''
|
||||
def setUp(self):
|
||||
self.user = models.User.objects.create_user(
|
||||
'mouse', 'mouse@mouse.mouse', 'mouseword',
|
||||
remote_id='https://example.com/user/mouse'
|
||||
)
|
||||
self.book = models.Edition.objects.create(
|
||||
title='Example Edition',
|
||||
remote_id='https://example.com/book/1',
|
||||
)
|
||||
|
||||
|
||||
def test_create_quotation(self):
|
||||
quotation = status_builder.create_quotation(
|
||||
self.user, self.book, 'commentary', 'a quote')
|
||||
self.assertEqual(quotation.quote, 'a quote')
|
||||
self.assertEqual(quotation.content, 'commentary')
|
|
@ -1,39 +0,0 @@
|
|||
from django.test import TestCase
|
||||
|
||||
from bookwyrm import models
|
||||
from bookwyrm import status as status_builder
|
||||
|
||||
|
||||
class Review(TestCase):
|
||||
''' we have hecka ways to create statuses '''
|
||||
def setUp(self):
|
||||
self.user = models.User.objects.create_user(
|
||||
'mouse', 'mouse@mouse.mouse', 'mouseword')
|
||||
self.book = models.Edition.objects.create(title='Example Edition')
|
||||
|
||||
|
||||
def test_create_review(self):
|
||||
review = status_builder.create_review(
|
||||
self.user, self.book, 'review name', 'content', 5)
|
||||
self.assertEqual(review.name, 'review name')
|
||||
self.assertEqual(review.content, 'content')
|
||||
self.assertEqual(review.rating, 5)
|
||||
|
||||
review = status_builder.create_review(
|
||||
self.user, self.book, '<div>review</div> name', '<b>content', 5)
|
||||
self.assertEqual(review.name, 'review name')
|
||||
self.assertEqual(review.content, 'content')
|
||||
self.assertEqual(review.rating, 5)
|
||||
|
||||
def test_review_rating(self):
|
||||
review = status_builder.create_review(
|
||||
self.user, self.book, 'review name', 'content', -1)
|
||||
self.assertEqual(review.name, 'review name')
|
||||
self.assertEqual(review.content, 'content')
|
||||
self.assertEqual(review.rating, None)
|
||||
|
||||
review = status_builder.create_review(
|
||||
self.user, self.book, 'review name', 'content', 6)
|
||||
self.assertEqual(review.name, 'review name')
|
||||
self.assertEqual(review.content, 'content')
|
||||
self.assertEqual(review.rating, None)
|
|
@ -1,28 +0,0 @@
|
|||
from django.test import TestCase
|
||||
|
||||
from bookwyrm import models
|
||||
from bookwyrm import status as status_builder
|
||||
|
||||
|
||||
class Status(TestCase):
|
||||
''' we have hecka ways to create statuses '''
|
||||
def setUp(self):
|
||||
self.user = models.User.objects.create_user(
|
||||
'mouse', 'mouse@mouse.mouse', 'mouseword',
|
||||
local=False,
|
||||
inbox='https://example.com/user/mouse/inbox',
|
||||
outbox='https://example.com/user/mouse/outbox',
|
||||
remote_id='https://example.com/user/mouse'
|
||||
)
|
||||
|
||||
|
||||
def test_create_status(self):
|
||||
content = 'statuses are usually <i>replies</i>'
|
||||
status = status_builder.create_status(
|
||||
self.user, content)
|
||||
self.assertEqual(status.content, content)
|
||||
|
||||
reply = status_builder.create_status(
|
||||
self.user, content, reply_parent=status)
|
||||
self.assertEqual(reply.content, content)
|
||||
self.assertEqual(reply.reply_parent, status)
|
Loading…
Reference in a new issue