

def test_reset_db(self):
    Cluster(batch='a').save()
    Tags().save()
    TaggingSpeed().save()
    User().save()
    Pages().save()
    self.assert_count(Cluster, 1)
    self.assert_count(Tags, 1)
    self.assert_count(TaggingSpeed, 1)
    self.assert_count(User, 1)
    self.assert_count(Pages, 1)
    res = self.client.post(url_for('fixtures.reset_db'))
    self.assert_success(res)
    self.assert_count(Cluster, 0)
    self.assert_count(Tags, 0)
    self.assert_count(TaggingSpeed, 0)
    self.assert_count(User, 0)
    self.assert_count(Pages, 0)

dataset/ETHPy150Open dchaplinsky/unshred-tag/tests/fixtures.py FixturesTest.test_reset_db/original