Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad attr Call NameLoad Dict Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr CompareIn Str NameLoad NameLoad decorator_list Call NameLoad keyword Str keyword Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad keyword Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad keyword Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad keyword Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Call NameLoad Dict Str NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list Call NameLoad keyword ListLoad Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str ListLoad TupleLoad Num Str Str TupleLoad Num Str Str Str TupleLoad Num Str Str Str Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad Assign NameStore Str For NameStore ListLoad Str Str Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpMod NameLoad TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Call NameLoad keyword Str keyword Str keyword Str Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpMod NameLoad TupleLoad NameLoad NameLoad decorator_list Call NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpMod NameLoad TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpMod NameLoad TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Call NameLoad keyword Str keyword Str keyword Str NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpMod NameLoad TupleLoad NameLoad NameLoad decorator_list Call NameLoad keyword NameLoad decorator_list Call NameLoad keyword Str keyword Str
N/A N/A 
Tests for the Piwik template tags and filters.
 django.contrib.auth.models User django.http HttpRequest django.template Context django.test.utils override_settings analytical.templatetags.piwik PiwikNode analytical.tests.utils TagTestCase analytical.utils AnalyticalException PiwikTagTestCase N/A TagTestCase N/A N/A 
    Tests for the ``piwik`` template tag.
     test_tag N/A N/A self N/A N/A N/A r N/A N/A self render_tag piwik piwik N/A N/A N/A self assertTrue N/A  ? "https" : "http") + "://example.com/"; r r N/A N/A N/A self assertTrue N/A _paq.push(['setSiteId', 345]); r r N/A N/A N/A self assertTrue N/A img src="http://example.com/piwik.php?idsite=345" r r N/A test_node N/A N/A self N/A N/A N/A r N/A N/A N/A PiwikNode render N/A Context N/A N/A N/A N/A self assertTrue N/A  ? "https" : "http") + "://example.com/"; r r N/A N/A N/A self assertTrue N/A _paq.push(['setSiteId', 345]); r r N/A N/A N/A self assertTrue N/A img src="http://example.com/piwik.php?idsite=345" r r N/A test_domain_path_valid N/A N/A self N/A N/A N/A r N/A N/A self render_tag piwik piwik N/A N/A N/A self assertTrue N/A  ? "https" : "http") + "://example.com/piwik/"; r r N/A N/A override_settings PIWIK_DOMAIN_PATH example.com/piwik PIWIK_SITE_ID 345 test_no_domain N/A N/A self N/A N/A N/A N/A N/A self assertRaises AnalyticalException PiwikNode N/A N/A override_settings PIWIK_DOMAIN_PATH None test_no_siteid N/A N/A self N/A N/A N/A N/A N/A self assertRaises AnalyticalException PiwikNode N/A N/A override_settings PIWIK_SITE_ID None test_siteid_not_a_number N/A N/A self N/A N/A N/A N/A N/A self assertRaises AnalyticalException PiwikNode N/A N/A override_settings PIWIK_SITE_ID x test_domain_protocol_invalid N/A N/A self N/A N/A N/A N/A N/A self assertRaises AnalyticalException PiwikNode N/A N/A override_settings PIWIK_DOMAIN_PATH http://www.example.com test_domain_slash_invalid N/A N/A self N/A N/A N/A N/A N/A self assertRaises AnalyticalException PiwikNode N/A N/A override_settings PIWIK_DOMAIN_PATH example.com/ test_render_internal_ip N/A N/A self N/A N/A N/A req N/A HttpRequest N/A N/A N/A req META N/A REMOTE_ADDR 1.1.1.1 N/A context N/A Context N/A request req N/A r N/A N/A N/A PiwikNode render context N/A N/A N/A self assertTrue N/A N/A r startswith <!-- Piwik disabled on internal IP address r N/A N/A N/A self assertTrue N/A N/A r endswith --> r N/A N/A override_settings ANALYTICAL_INTERNAL_IPS N/A 1.1.1.1 test_uservars N/A N/A self N/A N/A N/A context N/A Context N/A piwik_vars N/A N/A 1 foo foo_val N/A 2 bar bar_val page N/A 3 spam spam_val visit N/A r N/A N/A N/A PiwikNode render context N/A msg Incorrect Piwik custom variable rendering. Expected:
%s
In:
%s N/A var_code N/A _paq.push(["setCustomVariable", 1, "foo", "foo_val", "page"]); _paq.push(["setCustomVariable", 2, "bar", "bar_val", "page"]); _paq.push(["setCustomVariable", 3, "spam", "spam_val", "visit"]); N/A N/A N/A N/A self assertIn var_code r N/A msg N/A var_code r N/A test_default_usertrack N/A N/A self N/A N/A N/A context N/A Context N/A user N/A User username BDFL first_name Guido last_name van Rossum N/A r N/A N/A N/A PiwikNode render context N/A msg Incorrect Piwik user tracking rendering.
Not found:
%s
In:
%s N/A var_code _paq.push(["setUserId", "BDFL"]); N/A N/A N/A self assertIn var_code r N/A msg N/A var_code r N/A N/A override_settings ANALYTICAL_AUTO_IDENTIFY True test_piwik_usertrack N/A N/A self N/A N/A N/A context N/A Context N/A piwik_identity BDFL N/A r N/A N/A N/A PiwikNode render context N/A msg Incorrect Piwik user tracking rendering.
Not found:
%s
In:
%s N/A var_code _paq.push(["setUserId", "BDFL"]); N/A N/A N/A self assertIn var_code r N/A msg N/A var_code r N/A test_analytical_usertrack N/A N/A self N/A N/A N/A context N/A Context N/A analytical_identity BDFL N/A r N/A N/A N/A PiwikNode render context N/A msg Incorrect Piwik user tracking rendering.
Not found:
%s
In:
%s N/A var_code _paq.push(["setUserId", "BDFL"]); N/A N/A N/A self assertIn var_code r N/A msg N/A var_code r N/A test_disable_usertrack N/A N/A self N/A N/A N/A context N/A Context N/A user piwik_identity N/A User username BDFL first_name Guido last_name van Rossum None N/A r N/A N/A N/A PiwikNode render context N/A msg Incorrect Piwik user tracking rendering.
Found:
%s
In:
%s N/A var_code _paq.push(["setUserId", "BDFL"]); N/A N/A N/A self assertNotIn var_code r N/A msg N/A var_code r N/A N/A override_settings ANALYTICAL_AUTO_IDENTIFY True N/A N/A override_settings PIWIK_DOMAIN_PATH example.com PIWIK_SITE_ID 345