Esempio n. 1
0
def test_group_by_class():
    snapshot()
    a = AAA()
    b = BBB()
    c = BBB()

    result = group_by_class()
    assert result['tests.test_drainhunter.BBB'] == [b, c]
    assert result['tests.test_drainhunter.AAA'] == [a]
Esempio n. 2
0
def test_snapshot_must_memorize_new_objects():
    snapshot()

    a = AAA()
    b = BBB()
    result = list(get_new_objects())
    assert a in result
    assert b in result

    c = BBB()
    result = list(get_new_objects())
    assert a in result
    assert b in result
    assert c in result
Esempio n. 3
0
def take_snapshot(request):
    snapshot()

    return HttpResponseRedirect(reverse('drainhunter-index'))