<commit_before># -*- coding: utf8 -*-
import json
import requests
import os

from django.conf import settings
from django.core.management.base import BaseCommand


class Command(BaseCommand):
    def handle(self, *args, **options):
        fixtures_path = os.path.join(settings.BASE_DIR, 'helpers/fixtures/github')
        data = json.load(open(os.path.join(fixtures_path, 'push_master.json')))

        r = requests.post("http://localhost:8000/github-webhook/",
                          data=json.dumps(data),
                          headers={'X-GitHub-Event': "push"})
        print r.text<commit_msg>fix url in push_test_github_hook command<commit_after># -*- coding: utf8 -*-
import json
import requests
import os

from django.conf import settings
from django.core.management.base import BaseCommand


class Command(BaseCommand):
    def handle(self, *args, **options):
        fixtures_path = os.path.join(settings.BASE_DIR, 'helpers/fixtures/github')
        data = json.load(open(os.path.join(fixtures_path, 'push_master.json')))

        r = requests.post("http://localhost:8000/webhooks/github/",
                          data=json.dumps(data),
                          headers={'X-GitHub-Event': "push"})
        print r.text
{'fraction_non_alphanumeric': 0.13064516129032258, 'fraction_numerical': 0.008064516129032258, 'mean_word_length': 2.8421052631578947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7147629', 'n_tokens_mistral': 373, 'n_tokens_neox': 363, 'n_words': 75}