File: plugin_bad_param.py

package info (click to toggle)
graphite-web 1.2.1~pre2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,976 kB
  • sloc: javascript: 86,824; python: 25,420; makefile: 124; sh: 91; ruby: 74; perl: 24
file content (33 lines) | stat: -rw-r--r-- 536 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from graphite.functions.params import Param, ParamTypes


def test(seriesList):
    """This is a test function"""
    return seriesList


test.group = 'Test'
test.params = [
  Param('seriesList', ParamTypes.seriesList, required=True),
  'bad param',
]

SeriesFunctions = {
  'testFunc': test,
}


def pieTest(series):
    """This is a test pie function"""
    return max(series)


pieTest.group = 'Test'
pieTest.params = [
  Param('series', ParamTypes.series, required=True),
  'bad param',
]

PieFunctions = {
  'testFunc': pieTest,
}