mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-21 17:11:06 +00:00
fix failing test
This commit is contained in:
parent
14dba48415
commit
750cedd078
1 changed files with 11 additions and 1 deletions
|
@ -155,9 +155,19 @@ class BaseActivity(TestCase):
|
|||
result = resolve_remote_id(
|
||||
"https://example.com/user/moose", model=models.User
|
||||
)
|
||||
|
||||
self.assertTrue(
|
||||
models.User.objects.filter(
|
||||
remote_id="https://example.com/user/moose"
|
||||
).exists()
|
||||
) # moose has been added to DB
|
||||
self.assertTrue(
|
||||
models.User.objects.filter(
|
||||
remote_id="https://example.com/user/ali"
|
||||
).exists()
|
||||
) # Ali has been added to DB
|
||||
self.assertIsInstance(result, models.User)
|
||||
self.assertEqual(result.name, "moose?? moose!!")
|
||||
self.assertEqual(models.User.objects.count(), 3) # created moose plus the alias
|
||||
alias = models.User.objects.last()
|
||||
self.assertEqual(alias.name, "Ali As")
|
||||
self.assertEqual(result.also_known_as.first(), alias) # Ali is alias of Moose
|
||||
|
|
Loading…
Reference in a new issue