def test_removal_happens(self):
     self.entity._mentions = {}
     _process_mentions(self.content, self.entity)
     self.assertEqual(
         set(self.content.mentions.all()),
         set(),
     )
Exemple #2
0
 def test_removal_happens(self):
     self.entity._mentions = {}
     _process_mentions(self.content, self.entity)
     self.assertEqual(
         set(self.content.mentions.all()),
         set(),
     )
 def test_addition_happens(self):
     self.entity._mentions = {
         self.profile.fid,
         self.profile2.fid,
     }
     _process_mentions(self.content, self.entity)
     self.assertEqual(
         set(self.content.mentions.all()),
         {self.profile, self.profile2},
     )
Exemple #4
0
 def test_addition_happens(self):
     self.entity._mentions = {
         self.profile.fid,
         self.profile2.fid,
     }
     _process_mentions(self.content, self.entity)
     self.assertEqual(
         set(self.content.mentions.all()),
         {self.profile, self.profile2},
     )