コード例 #1
0
ファイル: utils.py プロジェクト: IvanJijon/detective.io
 def test_topic_model_create(self):
     topic = self.create_topic()
     rev_origin = topic_cache.version(topic)
     Person = topic.get_models_module().Person
     p = Person.objects.create(first_name='Pierre', name='Bellon')
     rev_target = topic_cache.version(topic)
     self.assertEqual(rev_target, rev_origin + 1)
コード例 #2
0
 def test_topic_model_create(self):
     topic = self.create_topic()
     rev_origin = topic_cache.version(topic)
     Person = topic.get_models_module().Person
     p = Person.objects.create(first_name='Pierre', name='Bellon')
     rev_target = topic_cache.version(topic)
     self.assertEqual(rev_target, rev_origin + 1)
コード例 #3
0
 def test_topic_update(self):
     # if we update a topic, its revision number should be incremented
     topic = self.create_topic()
     rev = topic_cache.version(topic)
     topic.title = "New title"
     topic.save()
     self.assertEqual(topic_cache.version(topic), rev + 1)
コード例 #4
0
ファイル: utils.py プロジェクト: IvanJijon/detective.io
 def test_topic_update(self):
     # if we update a topic, its revision number should be incremented
     topic = self.create_topic()
     rev = topic_cache.version(topic)
     topic.title = "New title"
     topic.save()
     self.assertEqual(topic_cache.version(topic), rev+1)
コード例 #5
0
ファイル: utils.py プロジェクト: afrigeo/detective.io
 def test_topic_model_create(self):
     topic = self.create_topic()
     Person = topic.get_models_module().Person
     p = Person.objects.create(first_name="Pierre", name="Bellon")
     rev_origin = topic_cache.version(topic)
     p = Person.objects.get(first_name="Pierre", name="Bellon")
     p.first_name = "Matthieu"
     p.save()
     rev_target = topic_cache.version(topic)
     self.assertEqual(rev_target, rev_origin + 1)
コード例 #6
0
 def test_topic_delete(self):
     topic = self.create_topic()
     rev = topic_cache.version(topic)
     topic.delete()
     self.assertEqual(topic_cache.version(topic), rev + 1)
コード例 #7
0
 def test_topic_creation(self):
     topic = self.create_topic()
     rev = topic_cache.version(topic)
     self.assertIsNotNone(rev, 0)
コード例 #8
0
ファイル: utils.py プロジェクト: IvanJijon/detective.io
 def test_topic_delete(self):
     topic = self.create_topic()
     rev = topic_cache.version(topic)
     topic.delete()
     self.assertEqual(topic_cache.version(topic), rev+1)
コード例 #9
0
ファイル: utils.py プロジェクト: IvanJijon/detective.io
 def test_topic_creation(self):
     topic = self.create_topic()
     rev = topic_cache.version(topic)
     self.assertIsNotNone(rev, 0)