<commit_before>import unittest
import os

from orm import ORM
from orm import model
from orm import fields


class User(model.Model):
	first_name = fields.CharField(max_length=40, blank=True)
	last_name = fields.CharField(max_length=40, blank=True)
	username = fields.CharField(max_length=40)
	password = fields.CharField(max_length=40)

testDBpath = "test.db"

class modelTest(unittest.TestCase):

	def setUp(self):
		if os.path.isfile(testDBpath):
			os.remove(testDBpath)
		self.o = ORM()
		self.o.registerModel(User)

	def tearDown(self):
		if os.path.isfile(testDBpath):
			os.remove(testDBpath)

	def test_getfields(self):
		self.assertEquals(User.getfields(), ['created', 'first_name', 'last_name', 'password', 'pk', 'updated', 'username'])

	def test_modelSQL(self):
		self.assertEquals(User.createTableSQL(), "CREATE TABLE users (created datetime, first_name varchar(40), last_name varchar(40), password varchar(40), pk integer, updated datetime, username varchar(40))")

if __name__ == '__main__':
    unittest.main()<commit_msg>More tests<commit_after>import unittest
import os

from orm import ORM
from orm import model
from orm import fields


class User(model.Model):
	first_name = fields.CharField(max_length=40, blank=True)
	last_name = fields.CharField(max_length=40, blank=True)
	username = fields.CharField(max_length=40)
	password = fields.CharField(max_length=40)

testDBpath = "test.db"

class modelTest(unittest.TestCase):

	def setUp(self):
		if os.path.isfile(testDBpath):
			os.remove(testDBpath)
		self.o = ORM()
		self.o.registerModel(User)

	def tearDown(self):
		if os.path.isfile(testDBpath):
			os.remove(testDBpath)

	def test_tablename(self):
		self.assertEquals(User.tableName(), 'users')

	def test_getfields(self):
		self.assertEquals(User.getfields(), ['created', 'first_name', 'last_name', 'password', 'pk', 'updated', 'username'])

	def test_modelSQL(self):
		self.assertEquals(User.createTableSQL(), "CREATE TABLE users (created datetime, first_name varchar(40), last_name varchar(40), password varchar(40), pk integer, updated datetime, username varchar(40))")

if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.1330232558139535, 'fraction_numerical': 0.014883720930232559, 'mean_word_length': 6.0756578947368425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5353954', 'n_tokens_mistral': 779, 'n_tokens_neox': 722, 'n_words': 162}