Example #1
0
 def test_random_selector(self):
     generator = generators.RandomSelector()
     self.assertIn(generator.generate_value(
         {}, **{'list_of_values': ['a', 'b', 'c']}), ['a', 'b', 'c'])
     self.assertIn(
         'schema="$ctrl.SCHEMA" '
         'local-value="$ctrl.customizationArgs.list_of_values"',
         generator.get_html_template())
Example #2
0
 def test_random_selector(self):
     generator = generators.RandomSelector()
     self.assertIn(
         generator.generate_value({}, **{'list_of_values':
                                         ['a', 'b', 'c']}), ['a', 'b', 'c'])
     self.assertIn(
         'schema="SCHEMA" '
         'local-value="$parent.$parent.customizationArgs.list_of_values"',
         generator.get_html_template())
     self.assertIn('oppia.directive(\'randomSelector\'',
                   generator.get_js_template())
 def test_random_selector(self):
     generator = generators.RandomSelector()
     self.assertIn(
         generator.generate_value({}, **{'list_of_values':
                                         ['a', 'b', 'c']}), ['a', 'b', 'c'])