Esempio n. 1
0
    def test_chart_types_validity(self):
        chart = AddChartForm({'noun': 'highs', 'verb': 'fived',
             'accumulation_period': 'W'})
        self.assertTrue(chart.is_valid())

        chart = AddChartForm({'noun': 'highs', 'verb': 'fived',
              'variable_achievements': False, 'accumulation_period': 'W'})
        self.assertTrue(chart.is_valid())

        chart = AddChartForm({'noun': 'highs', 'verb': 'fived',
              'variable_achievements': True, 'accumulation_period': 'W',
              'target':2, 'target_operator': 'L'})
Esempio n. 2
0
 def test_instantiation_target_operator_without_target_fails(self):
     form = AddChartForm({'noun': 'yards', 'target_operator': 'L',
              'verb': 'hobbled'})
     self.assertFalse(form.is_valid())