Did I find the right examples for you? yes no

All Samples(951)  |  Call(951)  |  Derive(0)  |  Import(0)
Check that the expression is true.

src/s/t/stackalytics-HEAD/tests/unit/test_record_processor.py   stackalytics(Download)
 
        email = runtime_storage_inst.get_by_primary_key('<another-message-id>')
        self.assertTrue('mod:blueprint' in email['blueprint_id'])
        self.assertFalse('mod:invalid' in email['blueprint_id'])
 
        homer_mark = next(itertools.ifilter(
            lambda x: x['date'] == (timestamp - 1), marks), None)
        self.assertTrue(homer_mark.get('disagreement'),
                        msg='Disagreement: core set -2 after +2')
 
        bart_mark = next(itertools.ifilter(
            lambda x: x['date'] == (timestamp + 3), marks), None)
        self.assertTrue(bart_mark.get('disagreement'),
                        msg='Disagreement: core set +2 after -1')
 

src/t/r/trove-HEAD/trove/tests/unittests/guestagent/test_dbaas.py   trove(Download)
        self.assertEqual(options["basedir"], "/usr")
        self.assertEqual(options["tmpdir"], "/tmp")
        self.assertTrue("skip-external-locking" in options)
 
    def test_load_mysqld_options_error(self):
                         "Delete database queries are not the same")
 
        self.assertTrue(dbaas.LocalSqlClient.execute.called,
                        "The client object was not called")
 
                             "Delete user queries are not the same")
 
            self.assertTrue(dbaas.LocalSqlClient.execute.called,
                            "The client object was not called")
 
                    ]
        for text in expected:
            self.assertTrue(text in args[0].text, "%s not in query." % text)
        self.assertFalse("LIMIT " in args[0].text)
 
                    ]
        for text in expected:
            self.assertTrue(text in args[0].text, "%s not in query." % text)
 
        self.assertTrue("LIMIT " + str(limit + 1) in args[0].text)

src/h/e/heat-cfntools-1.2.7/heat_cfntools/tests/test_cfn_helper.py   heat-cfntools(Download)
    def test_to_boolean(self):
        self.assertTrue(cfn_helper.to_boolean(True))
        self.assertTrue(cfn_helper.to_boolean('true'))
        self.assertTrue(cfn_helper.to_boolean('yes'))
        self.assertTrue(cfn_helper.to_boolean('1'))
        self.assertTrue(cfn_helper.to_boolean(1))

src/m/o/mox3-0.7.0/mox3/tests/test_mox.py   mox3(Download)
    def testValidOr(self):
        """Or should be True if either Comparator returns True."""
        self.assertTrue(mox.Or(mox.IsA(dict), mox.IsA(str)) == {})
        self.assertTrue(mox.Or(mox.IsA(dict), mox.IsA(str)) == 'test')
        self.assertTrue(mox.Or(mox.IsA(str), mox.IsA(str)) == 'test')
    def testValidAnd(self):
        """And should be True if both Comparators return True."""
        self.assertTrue(mox.And(mox.IsA(str), mox.IsA(str)) == '1')
 
    def testClauseOneFails(self):
        """
        test_dict = {"mock": "obj", "testing": "isCOOL"}
        self.assertTrue(mox.And(mox.In("testing"),
                        mox.ContainsKeyValue("mock", "obj")) == test_dict)
 

src/t/e/testtools-0.9.35/testtools/tests/test_testcase.py   testtools(Download)
        self.assertEqual(1, len(raisedExceptions))
        self.assertTrue(
            exception is raisedExceptions[0],
            "%r is not %r" % (exception, raisedExceptions[0]))
 
        result = Test("test").run()
        self.assertFalse(result.wasSuccessful())
        self.assertTrue(Test.marker)
 
    def test_expectThat_adds_detail(self):
        result = test.run()
        details = test.getDetails()
        self.assertTrue("Failed expectation" in details)
 
    def test__force_failure_fails_test(self):
        result = test.run()
        self.assertFalse(result.wasSuccessful())
        self.assertTrue(test.remaining_code_run)
 
    def get_error_string(self, e):
        test.setUp()
        test.tearDown()
        self.assertTrue(test.setup_called)
 
    def test_teardown_uses_super(self):

src/t/e/testtools-HEAD/testtools/tests/test_testcase.py   testtools(Download)
        self.assertEqual(1, len(raisedExceptions))
        self.assertTrue(
            exception is raisedExceptions[0],
            "%r is not %r" % (exception, raisedExceptions[0]))
 
        result = Test("test").run()
        self.assertFalse(result.wasSuccessful())
        self.assertTrue(Test.marker)
 
    def test_expectThat_adds_detail(self):
        result = test.run()
        details = test.getDetails()
        self.assertTrue("Failed expectation" in details)
 
    def test__force_failure_fails_test(self):
        result = test.run()
        self.assertFalse(result.wasSuccessful())
        self.assertTrue(test.remaining_code_run)
 
    def get_error_string(self, e):
        test.setUp()
        test.tearDown()
        self.assertTrue(test.setup_called)
 
    def test_teardown_uses_super(self):

src/z/u/zuul-HEAD/tests/test_scheduler.py   zuul(Download)
        self.assertEqual(len(self.builds), 1)
        self.assertEqual(self.builds[0].name, 'project-merge')
        self.assertTrue(self.job_has_changes(self.builds[0], A))
 
        self.worker.release('.*-merge')
        self.waitUntilSettled()
        self.assertEqual(len(self.builds), 3)
        self.assertEqual(self.builds[0].name, 'project-test1')
        self.assertTrue(self.job_has_changes(self.builds[0], A))
        self.assertTrue(self.job_has_changes(self.builds[0], A))
        self.assertEqual(self.builds[1].name, 'project-test2')
        self.assertTrue(self.job_has_changes(self.builds[1], A))
        self.assertEqual(self.builds[2].name, 'project-merge')
        self.assertTrue(self.job_has_changes(self.builds[2], A, B))
        self.assertEqual(len(self.builds), 5)
        self.assertEqual(self.builds[0].name, 'project-test1')
        self.assertTrue(self.job_has_changes(self.builds[0], A))
        self.assertEqual(self.builds[1].name, 'project-test2')
        self.assertTrue(self.job_has_changes(self.builds[1], A))

src/z/u/zuul-2.0.0/tests/test_scheduler.py   zuul(Download)
        self.assertEqual(len(self.builds), 1)
        self.assertEqual(self.builds[0].name, 'project-merge')
        self.assertTrue(self.job_has_changes(self.builds[0], A))
 
        self.worker.release('.*-merge')
        self.waitUntilSettled()
        self.assertEqual(len(self.builds), 3)
        self.assertEqual(self.builds[0].name, 'project-test1')
        self.assertTrue(self.job_has_changes(self.builds[0], A))
        self.assertTrue(self.job_has_changes(self.builds[0], A))
        self.assertEqual(self.builds[1].name, 'project-test2')
        self.assertTrue(self.job_has_changes(self.builds[1], A))
        self.assertEqual(self.builds[2].name, 'project-merge')
        self.assertTrue(self.job_has_changes(self.builds[2], A, B))
        self.assertEqual(len(self.builds), 5)
        self.assertEqual(self.builds[0].name, 'project-test1')
        self.assertTrue(self.job_has_changes(self.builds[0], A))
        self.assertEqual(self.builds[1].name, 'project-test2')
        self.assertTrue(self.job_has_changes(self.builds[1], A))

src/p/e/perfidy-0.0.2/perfidy/tests/test_mapping.py   perfidy(Download)
        self.assertEqual(len(d2), 1)
        self.assertEqual(d2[k], v)
        self.assertTrue(k in d2)
        self.assertEqual(tuple(d2.keys()), (k,))
        self.assertEqual(tuple(d2.values()), (v,))
        d2 = d.with_pair(k, v)
        d3 = d2.with_pair(k, v)
        self.assertTrue(d2 is d3)
 
 
        self.assertRaises(KeyError, lambda: d[20])
        self.assertEqual(d.get(20, 'x'), 'x')
        self.assertTrue(d.with_pair(k2, v2) is d)
 
 
        self.assertEqual(set(d2.items()), set([(k1, v1), (k2, 45), (k3, v3)]))
 
        self.assertTrue(d.with_pair(k2, v2) is d)
 
 
        #explicitly using '==' and '!=' here to avoid guessing which the assert method calls.
        self.assertFalse(d1a == d0a)
        self.assertTrue(d1a != d0a)
        self.assertTrue(d1a == d1b, "equal frozendicts don't compare equal")
        self.assertFalse(d1a != d1b)

src/b/a/barbican-HEAD/barbican/tests/api/test_resources.py   barbican(Download)
                              "payload": "not-encrypted"}
 
        self.assertTrue(json_without_array['payload_content_type']
                        .startswith(' '), "whitespace should be there")
        self.assertTrue(json_without_array['payload_content_type']
                            {"name": "item2 "}]}
 
        self.assertTrue(json_with_array['an-array'][0]['name']
                        .startswith(' '), "whitespace should be there")
        self.assertTrue(json_with_array['an-array'][1]['name']

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next