def handle(self, *args, **options):
        feed_manager.enable_model_tracking()

        Tweet.objects.all().delete()
        Follow.objects.all().delete()
        UserProfile.objects.all().delete()
        User.objects.all().delete()
        Hashtag.objects.all().delete()

        self.print_users()
    def handle(self, *args, **kwargs):
        call_command("migrate", interactive=False)
        call_command("loaddata", "./pytutorial/fixtures/dj_data.json")

        # make sure we send data to Stream
        feed_manager.enable_model_tracking()

        for tweet in Tweet.objects.all():
            tweet.delete()
            tweet.save()
Example #3
0
    def handle(self, *args, **kwargs):
        call_command('migrate', interactive=False)
        call_command('loaddata', './pytutorial/fixtures/dj_data_mcr.json')

        #make sure we send data to Stream
        feed_manager.enable_model_tracking()

        for tweet in Tweet.objects.all():
            tweet.delete()
            tweet.save()
Example #4
0
    def test_pin(self):
        pin_url = reverse('pin')
        data = dict(message='test', board_name='My favourite things', item=5,
                    influencer=1)

        feed_manager.enable_model_tracking()

        with patch('stream.feed.Feed.add_activity') as mocked:
            self.auth_client.post(pin_url, data)
            self.assertEqual(mocked.call_count, 1)
Example #5
0
    def test_pin(self):
        pin_url = reverse('pin')
        data = dict(message='test',
                    board_name='My favourite things',
                    item=5,
                    influencer=1)

        feed_manager.enable_model_tracking()

        with patch('stream.feed.Feed.add_activity') as mocked:
            self.auth_client.post(pin_url, data)
            self.assertEqual(mocked.call_count, 1)
 def setUp(self):
     feed_manager.enable_model_tracking()
     self.User = get_user_model()
     self.bogus = self.User.objects.create()
     self.enricher = Enrich()
Example #7
0
 def setUp(self):
     feed_manager.enable_model_tracking()
 def setUp(self):
     feed_manager.enable_model_tracking()
     self.User = get_user_model()
     self.bogus = self.User.objects.create()
     self.enricher = Enrich()
Example #9
0
 def setUp(self):
     feed_manager.enable_model_tracking()