Skip to content

Instantly share code, notes, and snippets.

@GabiThume
GabiThume / gist:5938460
Created July 6, 2013 03:01
Socorro Coverage
Name Stmts Miss Cover Missing
-------------------------------------------------------------------------------------------
socorro 0 0 100%
socorro.app 0 0 100%
socorro.app.fetch_transform_save_app 73 10 86% 118-124, 127-133, 136-137, 155, 159
socorro.app.generic_app 78 8 90% 129, 160-161, 204-211
socorro.collector 0 0 100%
socorro.collector.collector_app 26 1 96% 111
socorro.collector.crashmover_app 10 1 90% 22
socorro.collector.throttler 88 5 94% 102, 136-137, 162-163
@mock.patch('requests.get')
def test_exploitable_crashes(self, rget):
url = reverse('crashstats.exploitable_crashes')
def mocked_get(url, **options):
assert 'crashes/exploitability' in url
return Response("""
{
"hits": [
@GabiThume
GabiThume / results
Last active December 18, 2015 15:59
coverage of socorro unittest
Do not exist testing directory for: webapi.
Missing tests in lib:
['socorro/socorro/lib/productVersionCache.py', 'socorro/socorro/lib/dynamicConfigurationManager.py', 'socorro/socorro/lib/uuid.py', 'socorro/socorro/lib/threadlib.py', 'socorro/socorro/lib/stats.py', 'socorro/socorro/lib/httpclient.py']
All coverage in processor.
All coverage in database.
Do not exist testing directory for: othertests.
@GabiThume
GabiThume / gist:5798726
Created June 17, 2013 17:48
This error is reached when "make" is running the following command: $ sudo /home/gabi/Desktop/CODE/repos/socorro/socorro-virtualenv/bin/python -c "from pgxnclient import cli; cli.main(['install', 'json_enhancements'])"
No handlers could be found for logger "pgxnclient.commands"
Makefile:51: /usr/lib/postgresql/9.2/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target `/usr/lib/postgresql/9.2/lib/pgxs/src/makefiles/pgxs.mk'. Stop.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/gabi/Desktop/CODE/repos/socorro/socorro-virtualenv/lib/python2.6/site-packages/pgxnclient/cli.py", line 31, in main
run_command(opt, parser)
File "/home/gabi/Desktop/CODE/repos/socorro/socorro-virtualenv/lib/python2.6/site-packages/pgxnclient/commands/__init__.py", line 96, in run_command
return opts.cmd(opts, parser=parser).run()
File "/home/gabi/Desktop/CODE/repos/socorro/socorro-virtualenv/lib/python2.6/site-packages/pgxnclient/commands/install.py", line 149, in run
<script src="http://processingjs.org/js/processing.min.js"></script>
<canvas id="processing-canvas"> </canvas>
<script type="text/processing" data-processing-target="processing-canvas">
/* @pjs preload="static/images/moon.jpg"; */
PImage img;
void setup() {
size(800, 800, P2D);
background(0);
@GabiThume
GabiThume / clock.js
Last active December 18, 2015 00:59
<script src="http://processingjs.org/js/processing.min.js"></script>
<canvas id="processing-canvas"> </canvas>
<script type="text/processing" data-processing-target="processing-canvas">
Clock c1, c2, c3, c4, c5, c6;
float coluna;
ArrayList clocks;
int sizeClock=30, sizeX=800, sizeY=800;
void setup(){
@GabiThume
GabiThume / test_forgot_password.py
Last active December 17, 2015 14:19
Functional test for ticket http://issues.mediagoblin.org/ticket/689 using Selenium WebDriver.
import pytest
from selenium import webdriver
def test_forgot_password():
drivers = []
drivers.append(webdriver.Firefox())
drivers.append(webdriver.Chrome())
for driver in drivers:
driver.get("http://127.0.0.1:6543/auth/login")
assert "MediaGoblin" in driver.title
@GabiThume
GabiThume / gist:5595096
Last active December 17, 2015 10:29
mediagoblin on FreeNode IRC log on May 06 about selenium/phantonjs
May 06 16:46:47 <gabithume> paroneayea, Hi! I was looking to PhantonJS because ticket #458 and I was thinking about trying casperJS (http://casperjs.org/) for high-level functional tests, should I create some tests on mediagoblin repos?
May 06 16:48:20 * LotusEcho (~LotusEcho@2620:0:2820:1400:20c2:ffa1:f60f:b7be) has joined #mediagoblin
May 06 16:51:09 * BjarniRunar has quit (Ping timeout: 252 seconds)
May 06 16:51:48 <paroneayea> hey gabithume
May 06 16:51:49 <paroneayea> looking
May 06 16:52:50 <paroneayea> gabithume: hm, what would casperjs give us that we wouldn't have with phantomjs?
May 06 16:52:57 <paroneayea> (also, what do you think of selenium?)
May 06 17:05:30 * AndChat|511 (~androbug@pdpc/supporter/active/thelovebug) has joined #mediagoblin
May 06 17:05:32 * AndroBug has quit (Read error: Connection reset by peer)
May 06 17:06:11 * AndChat-511 (~androbug@pdpc/supporter/active/thelovebug) has joined #mediagoblin
def test_topcrasher(self, rget, rpost):
# first without a version
no_version_url = reverse('crashstats.topcrasher',
args=('Firefox',))
url = reverse('crashstats.topcrasher',
args=('Firefox', '19.0'))
has_builds_url = reverse('crashstats.topcrasher',
args=('Firefox', '19.0', 'build'))
response = self.client.get(no_version_url)
ok_(url in response['Location'])
<Elrond> paroneayea - Hi back. [13:42]
<paroneayea> hey Elrond !
<Elrond> paroneayea - Reprocessing? [13:44]
<paroneayea> Elrond: yeah, let's talk about it :) [13:45]
ERC> /query joar [13:46]
<Elrond> I think, it's quite easy, IF media-types use the proc_state tools.
[13:47]
<Elrond> proc_state.get_queue_file() -- get from queue for normal, get from
main storage for reprocessing.
<Elrond> proc_state.delete_queue_file() -- delete if the queufile was on the